You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setup a cart promo rule with a specific coupon. Set both start date and end date with current date.
Go to fronted, add a product to cart and go to the cart page
Try to apply the coupon
Expected result
The coupon is valid and discount is applied
Actual result
The coupon is not valid and discount is not applied
In this piece of code the coupon expiration date is compared to the current datetime, but coupon expiration date always has 00:00:00 time, so that if the expiration day is today, that check cannot pass. Dates should be compared without considering time, like it's done in the Collection where the promo validity dates are compared to $now, and $now is a date without time.
The text was updated successfully, but these errors were encountered:
Preconditions
Steps to reproduce
Expected result
The coupon is valid and discount is applied
Actual result
The coupon is not valid and discount is not applied
In this piece of code the coupon expiration date is compared to the current datetime, but coupon expiration date always has 00:00:00 time, so that if the expiration day is today, that check cannot pass. Dates should be compared without considering time, like it's done in the Collection where the promo validity dates are compared to $now, and $now is a date without time.
The text was updated successfully, but these errors were encountered: