Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jun 2010
    Posts
    145
    Plugin Contributions
    0

    Default Coupon End Expiration Date beyond 2018?

    When I enter a coupon, the maximum expiration date is December 31, 2018. Is it possible to add more years into that drop-down menu so I can make coupons that have a longer expiration date? Or is it possible to have coupons without expiration dates at all?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Coupon Expiration Date

    If you need a ridiculously forever date on the Discount Coupon so things like:
    The coupon is valid between 07/19/2014 and 07/19/2025

    rather than a shorter time period to encourage people to buy today rather than in 2022 ... you could edit the date in phpMyAdmin in the table:
    coupons

    and change the date in the field:
    coupon_expire_date

    I tend to opt for the shorter date range to encourage coupon usage rather than a longer date range just to save an edit every year ...
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Coupon Expiration Date

    Quote Originally Posted by laurelsstitchery View Post
    When I enter a coupon, the maximum expiration date is December 31, 2018. Is it possible to add more years into that drop-down menu so I can make coupons that have a longer expiration date? Or is it possible to have coupons without expiration dates at all?
    Load the file /youradmin/includes/functions/general.php into a text editor

    On line#1976 you should see code that reads like

    Code:
    for ($i=2001:$i<2019;$i++) {
    Change these years to suit your needs.

    Save the file.

    Note: This date selector is used in several parts of ZenCart. This change will affect them all.

    Cheers
    RodG

    PS. I've just taken another look and it seems that it is only the coupon editor that uses this bit of code. Everything else appears to use SpiffyCal instead.
    Last edited by RodG; 31 Oct 2014 at 06:15 PM.

  4. #4
    Join Date
    Jun 2010
    Posts
    145
    Plugin Contributions
    0

    Default Re: Coupon Expiration Date

    Thanks for the info! For whatever reason I never think of updating the database directly. :)

  5. #5
    Join Date
    Oct 2007
    Posts
    328
    Plugin Contributions
    0

    Default Discount coupon End Date

    In Admin->Discount Coupons/Gift Certificates->Coupon Admin when creating a new coupon the latest selectable "End Date" from the drop-down list is 31 December 2018. How can I add more years to the drop-down list?

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Discount coupon End Date

    Issue is corrected in ZC 1.5.5; however, if you search admin/includes/functions/general.php for 2019 should find a line that looks like:
    Code:
     for ($i=2001;$i<2019;$i++){
    And replace with the below:
    Code:
       for ($i = date('Y') - 5, $j = date('Y') + 11; $i < $j; $i++) {
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Oct 2007
    Posts
    328
    Plugin Contributions
    0

    Default Re: Discount coupon End Date

    Thanks a lot!

  8. #8
    Join Date
    Oct 2013
    Location
    Indiana, United States
    Posts
    5
    Plugin Contributions
    0

    Default Re: Coupon Expiration Date

    I am going to assume that this information is now erratically different than what is posted in this thread... I have searched my file directory extensively for the "($i=2001:$i<2019;$i++) { " string, yes while using the Developers tool kit, and my search result returns ZERO results... even when search several different variations of the suggested code.

    I came to this thread because I too am having the same problem with my Zen Cart (yes I am using the latest version), but when I attempt to create a coupon code that I want to be valid past December 31st 2018, I simply can not do such because the date "2019" does not exist in the drop-down menu for "Expiration Dates" for the Coupon Generator. I additionally searched the /mydomain/admin panel/includes/English/coupon_admin, and the code to alter the dates does not exist there either....

    Just trying to figure out why this is still a problem even in 2017.... I mean, I get it why it may have been a problem in 2014, but you would think that by 2017 someone would have updated the "updates" of newer versions to have made accommodations for this by now. I'm not the only person having this issue, am I ?

    How do I add additional years to my coupon section? (and is there any other parts of my Zencart that will stop displaying the correct date come Jan 1st, 2019? )

    Thank you in advance

    ~ Kevin

  9. #9
    Join Date
    Oct 2013
    Location
    Indiana, United States
    Posts
    5
    Plugin Contributions
    0

    Default Re: Coupon Expiration Date

    Forget the previous question.... I found the location in my version of Zencart.

    It is located inside of my domain / admin panel / includes / functions / general.php

    I had to find it manually, for some reason or another the Tool Kit simply would not return any results for that line of text. Strange, but not the first time I have had that problem with the developers tool kit though.

    Thank you for the pointers, your comment is the ONLY reason I was able to fix the problem.

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Coupon Expiration Date

    K.McIntyre, I don't know what version of Zen Cart you're using, but the zen_draw_date_selector function was updated for this issue in Zen Cart 1.5.5, released in March of 2016.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 4 Jan 2016, 01:49 PM
  2. Coupon Expiration From Date of Issuance
    By smykey in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 8
    Last Post: 18 Jan 2010, 01:43 PM
  3. Adding expiration date to coupon emails?
    By KTNaturals in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 8 Feb 2007, 02:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR