Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Only show gift certificate option on payment page if customer has a gift certificate

    I want to Only show gift certificate option on payment page if customer has a gift certificate balance available
    Is this possible?

  2. #2
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    Quote Originally Posted by ShopVille View Post
    I want to Only show gift certificate option on payment page if customer has a gift certificate balance available Is this possible?
    How will you handle the situation where they have a gift code but haven't redeemed it yet?
    Do you want to hide the redemption part as well?

  3. #3
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    In my case there's no gift codes, we add a gift card balance to the account so we only want to show the redemption option when the customer actually has a balance available

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

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    I believe to only show GVs when there is a customer balance and to not even ask for a GV code, you would change:
    Code:
          $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
                             )));
    to read:
    Code:
    if ($this->user_has_gv_account($_SESSION['customer_id']) > 0) {
          $selection = array('id' => $this->code,
                             'module' => $this->title,
                             'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS,
                             'checkbox' => $this->use_credit_amount(),
                             'fields' => array(array(
                             'tag' => 'disc-'.$this->code
                             )));
    }
    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!

  5. #5
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    Quote Originally Posted by Ajeh View Post
    I believe to only show GVs when there is a customer balance and to not even ask for a GV code, you would change:
    Code:
          $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
                             )));
    to read:
    Code:
    if ($this->user_has_gv_account($_SESSION['customer_id']) > 0) {
          $selection = array('id' => $this->code,
                             'module' => $this->title,
                             'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS,
                             'checkbox' => $this->use_credit_amount(),
                             'fields' => array(array(
                             'tag' => 'disc-'.$this->code
                             )));
    }
    Thanks but it didn't seem to change anything

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

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    Are you saying a customer with a 0 GV balance still sees the GV info on the checkout_payment page?
    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!

  7. #7
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    Quote Originally Posted by Ajeh View Post
    Are you saying a customer with a 0 GV balance still sees the GV info on the checkout_payment page?
    Yes.
    Oh i need 7 characters

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

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    Could you post the code that you have for the function credit_selection() in the ot_gv.php file?
    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!

  9. #9
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    PHP Code:
     /**
       * check system to see if GVs should be made available or not. If true, then supply GV-selection fields on checkout pages
       */
      
    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() > || $this->use_credit_amount()) {
        if (
    $this->user_has_gv_account($_SESSION['customer_id']) > 0) {
          
    $selection = array('id' => $this->code,
                             
    'module' => $this->title,
                             
    'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS,
                             
    'checkbox' => $this->use_credit_amount(),
                             
    'fields' => array(array(
                             
    'tag' => 'disc-'.$this->code
                             
    )));
    }
        return 
    $selection;
      }
      
    /** 

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

    Default Re: Only show gift certificate option on payment page if customer has a gift certific

    Looks like you have and error in the brackets, try using:
    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()) {
    
    if ($this->user_has_gv_account($_SESSION['customer_id']) > 0) {
          $selection = array('id' => $this->code,
                             'module' => $this->title,
                             'redeem_instructions' => MODULE_ORDER_TOTAL_GV_REDEEM_INSTRUCTIONS,
                             'checkbox' => $this->use_credit_amount(),
                             'fields' => array(array(
                             '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: 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!

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Gift Certificate sending 25 emails; only one to customer
    By abran1984 in forum General Questions
    Replies: 7
    Last Post: 13 Sep 2011, 04:32 AM
  2. Gift Certificate Redemption Option not showing on Payment page
    By Schismatise in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 4 Mar 2009, 06:15 AM
  3. Want to use a printed gift certificate (with code) in the gift certificate process?
    By HelenSama in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 9
    Last Post: 15 Apr 2008, 02:04 PM
  4. customer has double gift certificate value
    By etoile03 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 8 Jan 2008, 09:46 PM
  5. Payment info page has lost Gift Certificate entry area
    By jeffmic in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 28 Nov 2006, 04:23 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