4

When you create a coupon code in Magento 1 or Magento 2 (a "Shopping Cart Price Rule"), you can set date range where the coupon is valid from/to. This information is stored in the salesrule table, and Magento appears to respect it. (i.e. if the end date has passed, Magento won't let you apply the coupon code)

However, Magento stores the actual codes for an individual sales rule in the salesrule_coupon table. This table includes a field named expiration_date which seems like it would be a way to set expiration dates on specific coupon codes with a sales rule. However, Magento does not (seem to?) respect this field.

Does anyone know what this field is for? Does it work and I'm just doing it wrong? Is it tracking something else? etc.

  • 2
    I checked Magento EE, seem that it's related to module vendor/magento/module-reminder. – Khoa TruongDinh Jul 20 '16 at 5:15
0

Based on the comments above, it seems like this field may be used for an Enterprise Edition feature.

0

So far, it is also used in Community Edition. If you change expiration_date field to 0000-00-00 00:00:00 or to other past date in the table, the coupon code would not work even if from_date and to_date are valid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.