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.
Since coupon form is available in cart thanks to views handler (https://www.drupal.org/node/1684892), if you display cart view with coupon handler in checkout page (thanks to commerce_cart_form_checkout_pane module), coupon submission will fail.
#limit_validation_errors
only take care of coupon_code
value, but in this case, coupon_code
is in a tree 'cart_contents_form', 'cart_contents_form_view', 'coupon_cart_form'
. So in case commerce_cart_form_checkout_pane is enabled, we should take care of this tree.
How to reproduce
- Install commerce_cart_form_checkout_pane module
- Add cart pane in checkout/*/checkout
- Add coupon form view handler in cart view
- Submit a valid coupon in coupon form in checkout page.
- Coupon always fail
Comment | File | Size | Author |
---|---|---|---|
#2 | limit_validation_errors-2710193-2.patch | 1.61 KB | GoZ |
|
Comments
Comment #2
GoZ CreditAttribution: GoZ as a volunteer commented