Steps to reproduce:
1. Install Commerce Coupon and Commerce Coupon Percentage
2. Create a new percent discount coupon and set it as 'inactive'.
3. Enter the coupon code for the coupon you just created when checking out.
Expected behavior: An error message saying "Your coupon code is not valid."
Actual behavior: Nothing. The coupon appears to be accepted, but isn't applied to your order. There is no message.
It looks like all the validation for whether a coupon is active or not is happening in the rules that actually apply the coupons to your order (e.g. the ones based on the 'Redeem a coupon' and 'Calculating the sell price of a product' events). It seems to me that a coupon that is inactive should never get that far; it should be set as invalid and display an error message when a user first tries to apply it. Am I perhaps misunderstanding how the active/inactive toggle is designed to work?
Comments
Comment #1
mikez93 commentedI'm encountering this issue as well. Coupons marked as "inactive" (active box unchecked) do not display error/invalid message when applied to an order.
I have my coupon pane on my checkout page. If a user enters a code that was previously active and hits "apply", no error message is displayed and no price modifications are made to the order.
I can not delete the inactive coupons as they are all associated with previous orders (the ui says it's not possible to delete coupons associated with an order).
I wonder it this is caused by something specific to my configuration as it seems like there would be more people out there encountering this problem than is indicated by the number of posts related to this issue...
Comment #2
pcambraFixing issue title
Comment #3
pcambraComment #4
pcambraAdded an is_active check in the validation, this should be fixed in the -dev version