Forums / Bug Reports / coupon has expired on the day before expire date.

coupon has expired on the day before expire date.

Locked

Views: 3,919

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
16 Jan 2008, 2:46 AM
#1
kb1 avatar

kb1

New Zenner

Join Date:
Jan 2008
Posts:
1
Plugin Contributions:
0

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

$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) . "'");

16 Jan 2008, 4:12 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Jan 2008, 4:29 AM
#3
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

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

Zen cart PCI compliant Hosting

16 Jan 2008, 4:37 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!