PDA

View Full Version : Update Cart when Cart form is submitted


rob148920
05-18-2009, 05:51 AM
I've done this before ASP, but the same method doesn't seem to work right with PHP.

I need the Cart Display page to update any changes to quantity fields on change.
Currently i'm doing this by using a javascript submit onchange event to each quantity field and i've included a hidden field called "ECartName_Update_1".

This updates the quantity fields fine, however, if i try to delete a item in the cart using the checkbox, the selected item and the last item in the cart are deleted.

If i remove the "ECartName_Update_1" field, the delete function works again, but of course the update onchange event now fails.

What's the correct method?

rob148920
05-18-2009, 06:02 AM
For some reason there were 2 update events on the page, upon deleting one and changing the field name below, the problem stopped.

I changed the field name to "ECartName_Update_1_x".