Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2009
    Posts
    78
    Plugin Contributions
    0

    Default Redemption Code Prompt

    HELP! I've tried posting this is the Gift Certificate forum but have not be able to resolve my problem. How do I remove the Gift Certificate Redemption Code (text and box) from the Payment Information page during CHECKOUT? I do not want my customers to be able to "Redeem" Gift Certifcates during CHECKOUT. I still want to "Apply Amount" and see "Available Balance."

    Note: I do not want to turn off Gift Certificates entirely - my customers will still be able to redeem Gift Certificates
    from the email link and Gift Certificates FAQ.

    I seem to be able to remove the input box by commenting out the following line in ot_gv.php (under function credit_selection)

    $selection = array('id' => $this->code,
    'module' => $this->title,
    'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS,
    'checkbox' => $this->use_credit_amount(),
    'fields' => array(array('title' => MODULE_ORDER_TOTAL_GV_TEXT_ENTER_CODE,
    // 'field' => zen_draw_input_field('gv_redeem_code', '', 'id="disc-'.$this->code.'" onkeyup="submitFunction(0,0)"'),
    'tag' => 'disc-'.$this->code
    )));
    }
    return $selection;

    But how do I remove the prompt for "Redemption Code"?

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

    Default Re: Redemption Code Prompt

    You could use this modification ... the two false settings will not show anything and if later you want to turn it back on, you can either put back the original code or just change them to true ...
    Code:
      function credit_selection() {
        global $db, $currencies;
        $gv_query = $db->Execute("select coupon_id from " . TABLE_COUPONS . " where coupon_type = 'G' and coupon_active='Y'");
        // checks to see if any GVs are in the system and active or if the current customer has any GV balance
        if ($gv_query->RecordCount() > 0 || $this->use_credit_amount()) {
          $selection = array('id' => $this->code,
                             'module' => $this->title,
                             'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS,
                             'checkbox' => $this->use_credit_amount(),
                             'fields' => array(array('title' => (false ? MODULE_ORDER_TOTAL_GV_TEXT_ENTER_CODE : ''),
                             'field' => (false ? zen_draw_input_field('gv_redeem_code', '', 'id="disc-'.$this->code.'" onkeyup="submitFunction(0,0)"') : ''),
                             'tag' => 'disc-'.$this->code
                             )));
    
        }
        return $selection;
      }
    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 2009
    Posts
    78
    Plugin Contributions
    0

    Default Re: Redemption Code Prompt

    Thank you! That did it - I knew I was close but weak on php an unfamiliar with 'false'.
    Quote Originally Posted by Ajeh View Post
    You could use this modification ... the two false settings will not show anything and if later you want to turn it back on, you can either put back the original code or just change them to true ...
    Code:
      function credit_selection() {
        global $db, $currencies;
        $gv_query = $db->Execute("select coupon_id from " . TABLE_COUPONS . " where coupon_type = 'G' and coupon_active='Y'");
        // checks to see if any GVs are in the system and active or if the current customer has any GV balance
        if ($gv_query->RecordCount() > 0 || $this->use_credit_amount()) {
          $selection = array('id' => $this->code,
                             'module' => $this->title,
                             'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS,
                             'checkbox' => $this->use_credit_amount(),
                             'fields' => array(array('title' => (false ? MODULE_ORDER_TOTAL_GV_TEXT_ENTER_CODE : ''),
                             'field' => (false ? zen_draw_input_field('gv_redeem_code', '', 'id="disc-'.$this->code.'" onkeyup="submitFunction(0,0)"') : ''),
                             'tag' => 'disc-'.$this->code
                             )));
    
        }
        return $selection;
      }

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

    Default Re: Redemption Code Prompt

    Thanks for the update that this worked for you to mask the redemption of Gift Certificate redemption text and input box but still take the Apply Amount ...
    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
    Aug 2006
    Posts
    126
    Plugin Contributions
    0

    Default Re: Redemption Code Prompt

    The above is a great help.

    In addition to this what would be the best way to,

    Instead of the 'apply amount' box defaulting to '0.00' I would like it to default to the full voucher balance.

  6. #6
    Join Date
    Aug 2006
    Posts
    126
    Plugin Contributions
    0

    Default Re: Redemption Code Prompt

    I found this,

    http://www.zen-cart.com/forum/showthread.php?t=154810

    Which almost works perfectly.

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

    Default Re: Redemption Code Prompt

    Quote Originally Posted by Justrimless View Post
    Which almost works perfectly.
    Is that a statement or a question or is something still not working for you in some manner?
    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!

  8. #8
    Join Date
    Aug 2006
    Posts
    126
    Plugin Contributions
    0

    Default Re: Redemption Code Prompt

    I posted that link in case anyone else is looking at doing the same as I am trying.

    There is an issue with that solution in that if the shopper changes the amount to 0 the GV balance is still used.

    Quote Originally Posted by timryan View Post
    Well I've almost got it..

    In the ot_gv.php module, I replaced

    PHP Code:
        // if we have no GV amount selected, set it to 0
         
    if (!$_POST['cot_gv']) $_SESSION['cot_gv'] = '0.00'
    with

    PHP Code:
        // if we have no GV amount selected, set it to 0
         
    if (!$_POST['cot_gv']) $_SESSION['cot_gv'] =  zen_user_has_gv_account($_SESSION['customer_id']); 
    Now when a customer goes to the checkout page, their balance is automatically applied to their order total.

    The customer can still apply (and override) a different amount if they wish, which applies on the confirmation page. However, if they enter '0' (ie to remove the gv deduction all together), it still uses their balance, due to what I've told the code above to do.

    I'll keep on working on ideas to have it do what I've got it to do, but allow the customer to remove it completely. If anyone has any ideas, feel free to send em my way

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

    Default Re: Redemption Code Prompt

    That is a problem as 0.00 is the same as 0.00 ...
    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!

  10. #10
    Join Date
    Aug 2006
    Posts
    126
    Plugin Contributions
    0

    Default Re: Redemption Code Prompt

    It's not a problem in my circumstances because I don't sell gift vouchers.
    My customers only have them if they have received them from me in lieu of an offer so they will almost always want to use their balance against an order.

    It might be an idea for future versions of Zencart that admin should be able to specify the default way that voucher balances are applied when a customers place an order.

 

 

Similar Threads

  1. v150 Redemption Code / Free Gift
    By bacbladerunner in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 29 Oct 2012, 03:55 AM
  2. Prompt to qualify for Free Shipping - code help please!
    By Scott_C in forum General Questions
    Replies: 6
    Last Post: 20 Feb 2011, 07:39 AM
  3. GC redemption code
    By 2scrappychixdesigns in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 13 Dec 2006, 03:21 AM
  4. No Redemption Code in Email
    By urbanfarmer in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 15
    Last Post: 26 May 2006, 12:53 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