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.
Hi
After filling in the coupon code on the customer site and calculating the coupon, the coupon-field is empty again (see screenshot) so that the customer can fill in another couponcode which also can be used with the other one. You get a double reduction.
How can I hide this field when the first coupon is entered?
Kris
Comment | File | Size | Author |
---|---|---|---|
coupon.png | 11.22 KB | blueblot |
Comments
Comment #1
pcambraDefinitely not a bug report, you want that the form dissapear once you enter a coupon, that's a feature request as the user should be able to introduce as many coupons as they want...
You can play with the code that applies the coupon to set an #access none once the button has been pressed.
Setting as a feature request to see if anyone else is looking for this.
Comment #2
aidanlis CreditAttribution: aidanlis commentedI'm definitely looking for this. Unfortunately changing the Coupon entity reference to be single valued causes the rules to break.
Comment #3
pcambraI guess it could be a setting in the checkout pane
Comment #4
aidanlis CreditAttribution: aidanlis commentedHere's a rule:
Comment #5
vadim.eremeev CreditAttribution: vadim.eremeev commented@aidanlis thanks for rule, works very good. Just one issue: it shows 2 messages (one warning and one error) together but would be nice somehow just show one (which is warning and can be configured from rule). What do you is there way to do it without css? Maybe some code patching
Comment #6
blueblot CreditAttribution: blueblot commented@aidanlis - rule works nice, thx
maybe the 2 messages aren't necessary if the coupon field was not shown after filling in the first coupon.
Matter is how to hide this field the second time?
blueblot