Woocommerce mini-cart sidebar add remove item link
-
Hi,
I am using woocommerce on my website and I have added the mini cart to the siderbar of my page. Works great and I have overwritten the template in my custom theme.
I also got it working that users can add more items to there cart by clicking on an Add button after each item. For this, I use a (ajax ) post to URL mywebsite.com/?add-to-cart=35. 35 in this case is the product ID.
Works great and item quantity increases when clicking this. However, I cannot get this working to remove item from cart. I looked into the code and foud something like update-quantity, but I do not get this working. I also tried adding quantity as extra param for add to cart, and then adding negative quantity. But that did not work too.
Is there something as easy as adding quantity for item, but for removing? Like mywebsite.com/?remove-from-cart, or ?update-quantity=x&product=x?
Thanks in advance!
- The topic ‘Woocommerce mini-cart sidebar add remove item link’ is closed to new replies.