Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default how can I code in a default coupon code into checkout page redeem, then auto-refresh?

    I'm looking at the code in tpl_checkout_default trying to figure out the right place add hard code a default discount coupon code and then auto refresh the page to redeem the coupon without the customer even noticing?

    Using the storewide sale with the MSRP and MAP mods creates 2 sets of discount displays on every product price - the msrp discount and then the sale discount. I think I can change this in the function_price script, I changed it to account for the same thing happening with specials, but would prefer to use the discount route so I can track the efficacy of our marketing campaigns.

    Any help would be much appreciated.

    Matt

    Zen Cart and it's community are the best!!

  2. #2
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: how can I code in a default coupon code into checkout page redeem, then auto-refr

    OK, so I figured out where to put the default coupon code into the text box. It's in includes>modules>order_total>ot_coupon.php on line 89. You enter the default text in the second set of quotes(which are empty) like this, where the coupon code is HolidaySale:

    zen_draw_input_field('dc_redeem_code', 'HolidaySale', 'id="disc-'.$this->code.'" onchange="submitFunction(0,0)"'),

    Now I am trying to remember how to auto refresh the page so the user doesn't even notice it, before the page is rendered.

    And also, is there a way to add a conditional that only shows the default code until the first page refresh, and for the "success" message displayed after the coupon is redeemed so it only shows after the first redemption?

    Zen Cart and it's community are the best!!

 

 

Similar Threads

  1. Moving Coupon Code Position on FEC Checkout Page
    By lindsey80 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 22 Jul 2012, 11:18 PM
  2. how to change this two osc code into zc code?
    By sunrise99 in forum General Questions
    Replies: 3
    Last Post: 21 Nov 2011, 05:30 AM
  3. How can I tell sales by coupon code?
    By milobloom in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 9 Nov 2009, 05:34 PM
  4. How to create a coupon/discount code during Checkout?
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 30 Mar 2009, 03:55 AM
  5. auto fill coupon code when checking out
    By palletjackracer in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 15 Dec 2008, 08:40 PM

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