Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Archived

This topic is now archived and is closed to further replies.

SSU

Coupon End Date is 2018 - Need to Extend

Recommended Posts

The coupon end date is 2018 and its running out... How do I extend the years ?

I am using osCommerce 2.2-MS2

 

Any help will be great. Preferably no addons please.

Share this post


Link to post
Share on other sites

I don't know anything about MS2 besides that it is ancient but I would think that the expiry date is stored in your database.  If you can track it down you should be able to change it.

Dan

Share this post


Link to post
Share on other sites

Hello,

Do you have a fine named  admin/includes/functions/add_ccgvdc_application_top.php  ?
If yes, find line 89 :

 for ($i=2001;$i<2019;$i++){ 

Modify in :

for ($i=date("Y");$i<date("Y")+10;$i++){

If no, tell us the name of your coupon addon, because there is no coupon by default in the MS2.2


with OsC 2.2 since 2006 ...

Share this post


Link to post
Share on other sites

thank you VERY much - i have also an old shop with same issue and been LOOOKING and looking for a solution.

it worked like a charm !

have a great day. :)

 

Share this post


Link to post
Share on other sites
On 11/17/2018 at 8:59 AM, bonbec said:

Hello,

Do you have a fine named  admin/includes/functions/add_ccgvdc_application_top.php  ?
If yes, find line 89 :


 for ($i=2001;$i<2019;$i++){ 

Modify in :


for ($i=date("Y");$i<date("Y")+10;$i++){

If no, tell us the name of your coupon addon, because there is no coupon by default in the MS2.2

Thank you, this helped me too!

Share this post


Link to post
Share on other sites

Note that Fred's fix is to extend the allowable dates out to "this year + 9 years". Keep that in mind as what's happening, rather than just extending another year. The starting date is now "this year" rather than fixed at 2001, in case you have a store with coupon entries older than 2019. I haven't looked at the code in question, so I don't know exactly what the intent is for this sliding window range of years. The old expression here was for a year range of 2001 through 2018.

Also note that osC 2.2 is ancient history. Unless you have been constantly updating it, the next PHP update on your server will blow it out of the water. It's also full of security holes, is lacking many useful features, requires an old MySQL library that is going away, and is not mobile-friendly. You really should be thinking about upgrading to osC 2.3.4.1BS "Frozen" and transferring your data over. Do it now, before it becomes an emergency.

Share this post


Link to post
Share on other sites

×