Download & Extend

cart update button doesn't update qtys

Project:Ubercart
Version:7.x-3.x-dev
Component:Cart/checkout
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

hello, on a cart page (/cart), if a qty is updated, and the button update is clicked, it does not update the cart. I tracked this down to line 967/968 in uc_cart. The following needs to be added:

'#submit' => array('uc_cart_view_form_submit'),

Comments

#1

Status:active» postponed (maintainer needs more info)

Works fine for me in 6.x-2.x-dev. You should upgrade and try again, but there haven't been any changes that would affect this so I suspect you may have a contributed module installed which affects the cart page.

#2

Oh, and there are SimpleTest test cases which check to see if the "Update" button works properly when quantities are changed. You can check the automated testing tab on the Ubercart project page to see that these tests produce the correct results, which again implies that this is something specific to your site.

#3

Notably if you are using uc_attributes_in_cart, see #1540028: Update cart not working

#4

Version:6.x-2.9» 6.x-2.x-dev
Status:postponed (maintainer needs more info)» needs review

I guess adding #submit consistently to all buttons on the cart page can't hurt.

AttachmentSizeStatusTest resultOperations
1837876-update-cart-submit.patch461 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 2,073 pass(es).View details

#5

We can even remove the reliance on testing $form_state['clicked_button'] by expanding this a bit further.

AttachmentSizeStatusTest resultOperations
1837876-update-cart-submit-5.patch1.06 KBIdlePASSED: [[SimpleTest]]: [MySQL] 2,075 pass(es).View details

#6

Status:needs review» needs work

The last submitted patch, 1837876-update-cart-submit-5.patch, failed testing.

#7

Status:needs work» needs review

#5: 1837876-update-cart-submit-5.patch queued for re-testing.

#8

Version:6.x-2.x-dev» 7.x-3.x-dev

Committed to 6.x, patch for 7.x attached.

AttachmentSizeStatusTest resultOperations
1837876-update-cart-submit-d7.patch1.02 KBIdlePASSED: [[SimpleTest]]: [MySQL] 2,729 pass(es).View details

#9

Status:needs review» fixed

Committed to 7.x.

#10

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.