Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30
  1. #11

    Default Re: checking out with gift certificate

    Quote Originally Posted by edadk View Post
    If a customer redeems a gift certificate during the checkout process, I'd like ZenCart to assume that the customer intends to actually use the gift certificate right now.

    I would like it to default to using the maximum amount of the gift certificate balance possible/required, with an option to change that or not use it for this purchase.

    Examples.
    1. A buyer is purchasing $20 worth of goods and redeems a $25 gift certificate during the checkout process. The default action should be that the gift certificate balance covers the entire purchase amount without the buyer having to specify, but the buyer can change that if they wish.

    2. A buyer is purchasing $100 worth of goods and redeems a $25 gift certificate during the checkout process. The default action should be that the gift certificate balance reduces the balance due on the order and the customer pays for the rest of the order using usual payment methods available.

    Using v1.39h
    Exactly...I am using 1.39 and the same thing happens: customers go to use a gift cert code and end up not knowing that they need to apply the amount to the total. They end up not using the gift certificate and mad at us for not taking their amount off the total of the invoice! It should automatically subtract the total amount as applicable and reflect this on the order confirmation.

  2. #12
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    I just started using Zen Cart this year and I am using v1.39h. I just encountered this exact same problem that you are all describing. It seems this thread was never resolved. I read the whole thread hoping it resulted in a solution! I would like for checkout to go back to Step 2 rather than go on to Step 3 (sounds like it did in older versions of Zen Cart), so that the customer can apply the amount in the "Apply Amount" box. Or is there a way to add the "Apply Amount" box in Step 3? That would solve the problem too so that the customer doesn't need to hit the back button to get to Step 2.

    Can I just copy and paste the Apply Amount box and stick it somewhere in Step 3?

  3. #13
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    For now, I just added these instructions on Step 2. As long as the customer applies the amount at the SAME TIME they redeem, it seems to work. Hopefully that will help avoid any issues.

    "If you are redeeming a new Gift Certificate, type the number into the box next to Redemption Code and make sure you fill out the 'Apply Amount' box to the right. That amount will be applied to your shopping cart and any remaining funds redeemed will be added to your account when you click the continue button."

  4. #14
    Join Date
    Dec 2011
    Posts
    48
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    I wanted my cart to default to applying the maximum balance available and still allow the customer to change it if they want to. For me it was as easy as changing one little spot to populate that field with the available balance instead of 0.00.

    I use 1.3.9h so keep that in mind when making modifications.

    In /includes/modules/order_total/ot_gv.php, line 48 looks like this:

    PHP Code:
        if (!zen_not_null(ltrim($_SESSION['cot_gv'], ' 0')) || $_SESSION['cot_gv'] == '0'$_SESSION['cot_gv'] = '0.00'
    Change it to this:

    PHP Code:
        if (!zen_not_null(ltrim($_SESSION['cot_gv'], ' 0')) || $_SESSION['cot_gv'] == '0'$_SESSION['cot_gv'] = $this->user_has_gv_account($_SESSION['customer_id']); 
    Basically you're replacing the '0.00' withe function built into zen cart that pulls the available balance from the database. Hope it works for you guys and be sure to BACKUP your file before making changes.

  5. #15
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    Quote Originally Posted by Lanbo View Post
    Basically you're replacing the '0.00' withe function built into zen cart that pulls the available balance from the database. Hope it works for you guys and be sure to BACKUP your file before making changes.
    Thanks, Lanbo! Will this work if the customer's available GV balance is greater than the order total?

  6. #16
    Join Date
    Dec 2011
    Posts
    48
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    Quote Originally Posted by AvaAdorn View Post
    Thanks, Lanbo! Will this work if the customer's available GV balance is greater than the order total?
    It works for me. Tried on an account with $11.37 for an order that was $9.33. Left it defaulted to 11.37 and on the confirmation page it changes it to 9.33. Must be some functionality built in to zen cart by the zen gurus that does that automatically.

  7. #17
    Join Date
    Feb 2012
    Posts
    106
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    Just updated my code and it works like a charm. Thanks again!

  8. #18
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    This works great, EXCEPT for when the customer has an existing balance and then redeems a new gift certificate. It does not update the field with the NEW gift certificate account balance.

    For example, customer has a $2.50 balance leftover from previous gift certificate. Redeems a new certificate worth $5.00. Balance in the box still shows $2.50, even though the customer's gift certificate balance is now $7.50.

    Any idea how to get it to repopulate the field when a new gift certificate is redeeemed and there is a previously existing balance?

  9. #19
    Join Date
    Dec 2011
    Posts
    48
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    Interesting. I didn't check on that. I'll have to look at the code to see what it's doing when I get a chance, but somebody else may already know and can respond more quickly.

    EDIT: And the same goes for if they don't have a balance at all and redeem during checkout.

  10. #20
    Join Date
    Dec 2011
    Posts
    48
    Plugin Contributions
    0

    Default Re: checking out with gift certificate

    Okay, guys. New code to get it to work better thanks to input from abcisme (good catch).

    This works for me. So to consolidate:

    In /includes/modules/order_total/ot_gv.php, line 48 (for me) looks like this:
    PHP Code:
        if (!zen_not_null(ltrim($_SESSION['cot_gv'], ' 0')) || $_SESSION['cot_gv'] == '0'$_SESSION['cot_gv'] = '0.00'
    and needs to be changed to:
    PHP Code:
        if (!zen_not_null(ltrim($_SESSION['cot_gv'], ' 0')) || $_SESSION['cot_gv'] == '0'$_SESSION['cot_gv'] = $this->user_has_gv_account($_SESSION['customer_id']); 
    The new change (lines 263-264 for me) looked like this:
    PHP Code:
            //          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_REDEEMED_AMOUNT. $currencies->format($gv_amount)), 'SSL'));
            
    $messageStack->add_session('redemptions',ERROR_REDEEMED_AMOUNT$currencies->format($gv_amount), 'success' ); 
    and needs to be changed to:
    PHP Code:
            $_SESSION['cot_gv'] = $this->user_has_gv_account($_SESSION['customer_id']);
            
    $messageStack->add_session('redemptions',ERROR_REDEEMED_AMOUNT$currencies->format($gv_amount), 'success' );
            
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT'error_message=' urlencode(ERROR_REDEEMED_AMOUNT$currencies->format($gv_amount)), 'SSL')); 
    (please note the first new line to pull the new gift balance)

    This will redirect it back to the payment page after processing the gift certificate and it will update the amount to use to be their new balance. They can then change it if they want to before proceeding.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v150 Only show gift certificate option on payment page if customer has a gift certificate
    By ShopVille in forum Templates, Stylesheets, Page Layout
    Replies: 25
    Last Post: 21 Jul 2014, 08:03 PM
  2. coupon for free gift with gift certificate purchase?
    By tkepler in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 24 Jul 2008, 03:31 PM
  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. Disable buying gift certificate with a gift certifcate
    By eaglewu in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 28 Jan 2007, 04:46 AM
  5. Gift Certificate Order with no Gift Certificate?
    By Jeff_Mash in forum Bug Reports
    Replies: 20
    Last Post: 14 Oct 2006, 09:10 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