Is it possible to get the reason that a coupon code is invalid? For example, if I have a shopping cart rule that specifies that the order subtotal must be $100 or more, and the user tries to use the coupon on a subtotal that is only $75, could I show a message along the lines of "your cart must be $100 or more"?
Magento Specific Error Messages on Coupon Codes
ce-1.5.1.0coupon
Best Answer
Here's an approach that I took to put in a better error message for two specific filters: the from date and to date.
Those filters are pretty simple compared to digging into the actual rule conditions such as subtotal, as you've mentioned in your question, but I think still provide a significant usability improvement with a pretty straight forward implementation.
There are two pretty clean rewrites that can be done to accomplish this.
Mage_SalesRule_Model_Resource_Rule_Collection::addWebsiteGroupDateFilter
Overload the addWebsiteGroupDateFilter method to prevent rules that don't match the date filter from being excluded entirely from the rules that are processed.
Clean_Checkout_Model_SalesRule_Validator::_canProcessRule
Overload the _canProcessRule method to check the dates and add a specific error message to the session.