Adding an item to the cart with an HTML link breaks cart quantity updater
-
I was looking for a way for a user to click a link that would then take them to their shopping cart with a specific item already added. I found various articles online that give you the html code to add to the end of the product URL (or site url) and those have worked, until you try to update the quantity in the shopping cart.
You can try either of the following links:
https://attendibis.com/cart/?add-to-cart=822&quantity=1
https://attendibis.com/cart/?add-to-cart=822Once you are in the cart, your quantity starts at 1. If you change the quantity to say 3 and hit update, it will update the quantity to be 4. If you then try and drop the quantity down to 2, it will update the quantity to 3. I tried this on a different website an up to date 2014 theme and up to date WC and it does the same thing, so it doesn’t appear to be a theme issue.
Any ideas on what is causing it to break? Or any other way that I can have someone follow a link which will accomplish the same goal, but not break the quantity update? The quantity update works fine if you add a product to the cart on the site, but if you use the link it will break it for that product.
Thanks
- The topic ‘Adding an item to the cart with an HTML link breaks cart quantity updater’ is closed to new replies.