Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    1,095
    Plugin Contributions
    4

    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,095
    Plugin Contributions
    4

    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. "Invalid coupon code" from Google Checkout
    By tbsmith in forum Addon Payment Modules
    Replies: 3
    Last Post: 3 Nov 2009, 10:27 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
  •