[ic] cant delete items from cart fix

Jeff Dafoe interchange-users@icdevgroup.org
Wed Oct 16 20:14:00 2002


I have seen this come up a couple of times in the past but didn't see a fix
in the mailing list.  The issue typically occurs when someone rolls their
own checkout or cart pages and does not include a quantity input field but
does include the delete-via-checkbox functionality demonstrated in
Foundation.  The symptom is that when the user attempts to delete, by
clicking on the checkbox, any item in the cart aside from the first item,
the item is not deleted.  The cause is that a checkbox with a name of
quantity-name and a value of 0 will not alone modify the quantity to zero.
The fix is to add a hidden field after the checkbox in the form:

    <INPUT TYPE=hidden NAME="[quantity-name]" VALUE="[item-quantity]">

The delete checkbox will then operate properly.

go swish,
Jeff