1

Edit: This appears to work out of the box, as long as everything is set up and coded correctly. See my comment below.

Using {exp:cartthrob:update_cart_form}, is there a way to make items with an updated quantity of 0 reliably delete from the cart when the form is submitted?

I can't find any documentation or postings on this question, but I'm hoping there is a way. It makes no sense to me that a customer can update their quantity to any other number, but 0 has no effect. Setting a quantity to 0 should bring the same result as calling delete.

In my testing, if I have a cart with multiple items, the last item listed will sometimes delete from the cart if I update it's quantity to 0. However, this is inconsistent. Setting quantity to 0 on any other item in the cart has no effect.

2
  • Post your template code maybe. Works fine here, even ajax submitting the firm. My guess is your form fields have mismatching ids maybe... Commented Apr 20, 2015 at 11:28
  • @JeremyDaalder You're right, I think there was something wrong with my original code in the template. After I posted my question, I did a bunch of tweaking on other items and it seems to have also fixed my original issue in the process. Unfortunately, I'm not sure exactly which change(s) inadvertently resolved this issue, so I can't share any lessons learned.
    – Darin
    Commented Apr 27, 2015 at 7:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.