coupon has expired on the day before expire date.
zen cart: Zen Cart 1.3.8a
PHP Version: 5.2.5 (Zend: 2.2.0)
Database: MySQL 5.0.51
I've solved this problem like this.
includes/modules/order_total/ot_coupon.php - line 251
Quote:
$date_query=$db->Execute("select coupon_expire_date from " . TABLE_COUPONS . "
where coupon_expire_date >= '".date("Y-m-d G:i:s", strtotime("-1 day -1 hour"))."' and
coupon_code='" . zen_db_prepare_input($dc_check) . "'");
Re: coupon has expired on the day before expire date.
What date did you have it set to expire?
What date did it expire?
Example: I make a coupon with the Start Date: 01-01-2008 and expire it on 01-15-2008 ...
Do you want it to expire (can no longer be used) on: 01-15-2008 or 01-16-2008?
Re: coupon has expired on the day before expire date.
If you want the last day that it can be used to be the 15th then you need to set it to expire the 16th, since it will expire at midnight server time
Re: coupon has expired on the day before expire date.
Well the better way is to manage the time too ...
We will be working on this in an upcoming release ...
Some want coupons to start at: 0:00:00 and end at 23:59:59 and others will want more specifics ...
That also lends towards server time vs store time etc. etc. etc.
Should be fun to work up all the ins and outs of this and a zillion other scenarios we have been chewing over ... :cool: