Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2008
    Posts
    15
    Plugin Contributions
    0

    Default Coupon Expiration From Date of Issuance

    Is there a way I could limit the coupon to be used within two weeks from the time it was issued to the customer?

    I am currently issuing coupons for first time customer registration automatically and it seems the expiration date is tagged with when you (the admin) created the coupon not when it was created.

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

    Default Re: Coupon Expiration From Date of Issuance

    As you pointed out, the Discount Coupons are based on the dates set when the Discount Coupon is created in the Admin ...

    To change this, you would need to customize the code to actually create a new Discount Coupon for each day so that it will have the full 2 weeks ...
    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!

  3. #3
    Join Date
    Jul 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Coupon Expiration From Date of Issuance

    Quote Originally Posted by Ajeh View Post
    As you pointed out, the Discount Coupons are based on the dates set when the Discount Coupon is created in the Admin ...

    To change this, you would need to customize the code to actually create a new Discount Coupon for each day so that it will have the full 2 weeks ...
    Thank you for your assistance. Would you be able to point me out to which file you believe I can achieve this through re-coding?

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

    Default Re: Coupon Expiration From Date of Issuance

    You would need to customize how the Create Account module works for this section:
    Code:
        if (NEW_SIGNUP_DISCOUNT_COUPON != '' and NEW_SIGNUP_DISCOUNT_COUPON != '0') {
          $coupon_id = NEW_SIGNUP_DISCOUNT_COUPON;
          $coupon = $db->Execute("select * from " . TABLE_COUPONS . " where coupon_id = '" . $coupon_id . "'");
          $coupon_desc = $db->Execute("select coupon_description from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . $_SESSION['languages_id'] . "'");
          $db->Execute("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $coupon_id ."', '0', 'Admin', '" . $email_address . "', now() )");
    
          $text_coupon_help = sprintf(TEXT_COUPON_HELP_DATE, zen_date_short($coupon->fields['coupon_start_date']),zen_date_short($coupon->fields['coupon_expire_date']));
    
          // if on, add in Discount Coupon explanation
          //        $email_text .= EMAIL_COUPON_INCENTIVE_HEADER .
          $email_text .= "\n" . EMAIL_COUPON_INCENTIVE_HEADER .
          (!empty($coupon_desc->fields['coupon_description']) ? $coupon_desc->fields['coupon_description'] . "\n\n" : '') . $text_coupon_help  . "\n\n" .
          strip_tags(sprintf(EMAIL_COUPON_REDEEM, ' ' . $coupon->fields['coupon_code'])) . EMAIL_SEPARATOR;
    
          $html_msg['COUPON_TEXT_VOUCHER_IS'] = EMAIL_COUPON_INCENTIVE_HEADER ;
          $html_msg['COUPON_DESCRIPTION']     = (!empty($coupon_desc->fields['coupon_description']) ? '<strong>' . $coupon_desc->fields['coupon_description'] . '</strong>' : '');
          $html_msg['COUPON_TEXT_TO_REDEEM']  = str_replace("\n", '', sprintf(EMAIL_COUPON_REDEEM, ''));
          $html_msg['COUPON_CODE']  = $coupon->fields['coupon_code'] . $text_coupon_help;
        } //endif coupon
    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!

  5. #5
    Join Date
    Jul 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Coupon Expiration From Date of Issuance

    Thank you so much, we will try to figure this one out.

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

    Default Re: Coupon Expiration From Date of Issuance

    You might look at how the Copy Discount Coupon feature works in the Admin and see if you can't adapt that ...
    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!

  7. #7
    Join Date
    Sep 2008
    Posts
    7
    Plugin Contributions
    0

    Default Text_coupon_help_date ??

    I did sent out the discount coupon to my customer through Admin panel. At the bottom of the mail suppose to have coupon expire date but it show "TEXT_COUPON_HELP_DATE".

    Please help!! Which part i should update to solve out the problem.

    Thank you

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

    Default Re: Coupon Expiration From Date of Issuance

    Check your language file:
    /admin/includes/languages/english/coupon_admin.php

    Line #50 : define('TEXT_COUPON_HELP_DATE', '<p><p>The coupon is valid between %s and %s</p></p>');
    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!

  9. #9
    Join Date
    Aug 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Coupon Expiration From Date of Issuance

    did anyone get this working ??

    it would be a much appreciated share..

 

 

Similar Threads

  1. v153 Coupon End Expiration Date beyond 2018?
    By laurelsstitchery in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 16
    Last Post: 19 Jan 2022, 10:45 AM
  2. Sales or Specials with Time and Date (instead of date only) Expiration
    By townsend2009 in forum Setting Up Specials and SaleMaker
    Replies: 3
    Last Post: 29 Jan 2015, 07:56 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

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