WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Issue with item quantity (7 posts)

  1. timothymalcham
    Member
    Posted 1 year ago #

    Whenever an item is added to the cart (from the single product page), refreshing the page or going to the cart and using the browser's back button to return to the product page adds another of that item to the cart automatically. Is there a way to stop this from happening?

    I suspect it has something to do with the "product successfully added to cart" message that appears (and stays when page is refreshed or you return back to the page). I'm using the free mystile theme. I would share the link to the site, but we have an under construction page up.

    Thanks for your help.

    http://wordpress.org/extend/plugins/woocommerce/

  2. Roy Ho
    Member
    Posted 1 year ago #

    Refreshing the page adds another item to the cart because it is being processed via a get process where "add to cart" parameter is passed.

    Why are you having issue with this?

  3. timothymalcham
    Member
    Posted 1 year ago #

    Well, I'm hoping to avoid a situation where a customer accidentally adds a product to the cart more times than they intended to.

    I noticed that you get sent to a new page when you hit the add to cart button, and it's looks nearly identical aside from "product successfully added to cart" message.

    Is there an alternative way to add a product to the cart, without directing the user to a page that is possibly (I don't know for sure what's happening on this page) adding items to their cart without their knowledge (since the add to cart button was only clicked once)?

  4. Roy Ho
    Member
    Posted 1 year ago #

    No, it is not redirecting to a new page...it is the same page with arguments attached...The way you wanted is more of a POST than a GET. But that is something the plugin has to change and nothing you can do on your end. That is the design.

    With that said, there is one other alternative is to make it submit via AJAX. But this is not something I can give you the code to. It has to be custom coded.

  5. Abdul Awal Uzzal
    Member
    Posted 1 year ago #

    Hi,
    I am also having almost same problem. When anybody clicks on add to cart from a single product page. The system automatically adds 1 more product. So, if select 1, it adds 2.

    Can you please help me fixing this issue... Really need this asap.

    Thank You

  6. Roy Ho
    Member
    Posted 1 year ago #

    @Abdul - you should start a different thread as your issue is not related to the OP.

  7. timothymalcham
    Member
    Posted 1 year ago #

    Thanks for your help, this gives me a good idea of what I need to do. I'll mark this as resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic