Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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'),
Comment | File | Size | Author |
---|---|---|---|
#8 | 1837876-update-cart-submit-d7.patch | 1.02 KB | longwave |
#5 | 1837876-update-cart-submit-5.patch | 1.06 KB | longwave |
#4 | 1837876-update-cart-submit.patch | 461 bytes | longwave |
Comments
Comment #1
TR CreditAttribution: TR commentedWorks 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.
Comment #2
TR CreditAttribution: TR commentedOh, 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.
Comment #3
longwaveNotably if you are using uc_attributes_in_cart, see #1540028: Update cart not working
Comment #4
longwaveI guess adding #submit consistently to all buttons on the cart page can't hurt.
Comment #5
longwaveWe can even remove the reliance on testing $form_state['clicked_button'] by expanding this a bit further.
Comment #7
longwave#5: 1837876-update-cart-submit-5.patch queued for re-testing.
Comment #8
longwaveCommitted to 6.x, patch for 7.x attached.
Comment #9
longwaveCommitted to 7.x.