Results 1 to 7 of 7
  1. #1
    Join Date
    May 2010
    Posts
    7
    Plugin Contributions
    0

    Default Can I automatically apply Gift Certificate balance to order on checkout?

    Hi,

    I've been able to avoid having to ask how to do something as I have been able to find what I needed on here! Until now...I can't seem to find any related threads to my question, and I am stumpted trying to figure it out myself. So ANY help will be appreciated!

    In relation to Gift Certificates, I want to change how it gets applied to the customers order. Currently, the customer has to manually apply what amount they want to use from their available balance on the Checkout page, which then get's updated on the Confirmation page.

    Now, I find it a little silly, and an extra step for the customer to have to apply it themselves. My question is, is there a way to insert coding to automatically apply their available gv amount when they checkout their shopping cart.

    For example, if a customer has a $50 gv balance, and the product they're purchasing is $20, on the checkout page, it displays a -$20 from their gv balance. Making the order total $0.00 and leaving them with $30 gv balance after the order. Or if they are purchasing something that is $80, then their full available balance is used, ie -$50, and they pay for the remaining $30.

    So in summary, I need to tailor the code so when a customer clicks checkout on the shopping cart, and lands on the checkout page, their order total shows the gift certificate deduction automatically (for customers with a gv balance), without having to enter anything.

    I am currently using 1.3.8a, with some mods, but nothing that should impact what I'm asking for...

    I need to get this working in the next 3-4 days.

    Hope it all makes sense...

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

    Default Re: Can I automatically apply Gift Certificate balance to order on checkout?

    The current code is not designed for this as many people purchase Gift Certificates to send to others ...

    You would have to customize the code to preload the balance of the Customer's gv balance to do this automatically for them ...
    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
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Can I automatically apply Gift Certificate balance to order on checkout?

    And you might want to consider the case where the customer DOESN'T really want to use the GV balance to pay for their full order, but if you don't CLEARLY tell them to change the automatically-applied amount, then they'll end up blowing their GV balance without any warning.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    May 2010
    Posts
    7
    Plugin Contributions
    0

    Default Re: Can I automatically apply Gift Certificate balance to order on checkout?

    Thanks guys.

    Ajeh. Is there any existing code that I can copy/adapt that would preload the gv balance and apply to the order total on the checkout page? If somebody could lead me in the right direction for which code does what and how I can adapt for my needs that would be great!

    DrByte. I would still probably provide a 'gv amount override' option, so the customer can remove/change the auto-applied gv amount if they wish.

    Thanks again.

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

    Default Re: Can I automatically apply Gift Certificate balance to order on checkout?

    I have not seen any code running around for this ... but having posted so many threads you never know what I or someone else might have customized for folks needing odd 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!]
    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!

  6. #6
    Join Date
    May 2010
    Posts
    7
    Plugin Contributions
    0

    Default Re: Can I automatically apply Gift Certificate balance to order on checkout?

    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

  7. #7
    Join Date
    May 2010
    Posts
    7
    Plugin Contributions
    0

    Default Re: Can I automatically apply Gift Certificate balance to order on checkout?

    I accidently duplicated my last post...
    Last edited by timryan; 13 May 2010 at 02:45 AM. Reason: Duplicated post

 

 

Similar Threads

  1. v139h Crediting to Gift Certificate Balance Automatically
    By bobthemolder in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 25 Jun 2012, 03:15 PM
  2. Can I automatically create a batch of Gift Certificate codes?
    By hockey2112 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 22 Oct 2010, 03:48 PM
  3. add an apply gift balance button?
    By bonnit in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 Feb 2010, 11:45 AM
  4. Gift Certificate Balance?
    By FatGuyinAZ in forum General Questions
    Replies: 1
    Last Post: 23 Jan 2008, 08:41 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