Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Location
    Norwich, UK
    Posts
    120
    Plugin Contributions
    0

    Default Use of gift certificate and coupon together - 1 needs to be disabled.

    Hi Guys.
    Done a quick search to find nothing.

    I want to be able to stop customers from using both gift certificates and coupons together.

    Any way to do this?
    FMUK Consulting - Web Design & Development | Graphics | Marketing | Apps - http://www.FMUKConsulting.co.uk

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

    Default Re: Use of gift certificate and coupon together - 1 needs to be disabled.

    Gift Certificates are Cash that the customer has paid you, been paid by someone else or something you have given the customer the same as Cash ...

    Discount Coupons are a discount on Products ...

    Why would you want to prevent someone from spending Cash and using a Discount Coupon at the same time?

    Perhaps understanding a bit more of what is behind your question would help in working out a solution ...
    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!

  3. #3
    Join Date
    Jul 2009
    Location
    Norwich, UK
    Posts
    120
    Plugin Contributions
    0

    Default Re: Use of gift certificate and coupon together - 1 needs to be disabled.

    Hi Ajeh,

    I understand what you mean. However we offer gift certificates as prizes for competitions.

    So if we offer a gift certificate, and have a coupon a £20 item becomes £10.

    I hope you get what I mean. Is there a way to disable one if a coupon is present.. or vice-versa.
    FMUK Consulting - Web Design & Development | Graphics | Marketing | Apps - http://www.FMUKConsulting.co.uk

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

    Default Re: Use of gift certificate and coupon together - 1 needs to be disabled.

    This may work, but you will really need to test it and consider the implications of blocking Discount Coupons and GVs from being used at the same time ...

    Edit the file:
    /includes/modules/order_total/ot_coupon.php

    and add the code in RED:
    Code:
      function calculate_deductions($order_total) {
        global $db, $order, $messageStack, $currencies;
        $currencyDecimalPlaces = $currencies->get_decimal_places($_SESSION['currency']);
        $od_amount = array('tax'=>0, 'total'=>0);
    
        // bof: prevent Discount Coupon and GV from being used at the same time
        if ($_SESSION['cot_gv'] > 0.00 && (int)$_SESSION['cc_id'] > 0) {
          $_SESSION['cc_id'] = 0;
          define('TEXT_INVALID_COUPON_AND_GV', 'No Discount Coupon and GV, please use one or the other');
          $messageStack->add_session('redemptions', TEXT_INVALID_COUPON_AND_GV,'caution');
          $this->clear_posts();
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true, false));
        }
        // eof: prevent Discount Coupon and GV from being used at the same time
    
        if ($_SESSION['cc_id'])
    You need to test this for all combinations of redeeming GV and Discount Coupons to ensure reguardless of pattern that the GV can be claimed to add the amount to the customer balance, but that the GV and Discount Coupon cannot be used together ...

    Example:
    1 Add Discount Coupon only, go back to shopping, add GV amount

    2 Add GV amount only, go back to shopping, add Discount Coupon

    3 Add Discount Coupon and GV amount to claim, try to continue

    4 Add Discount Coupon and GV redeem code and GV amount to claim, try to continue

    5 Add Discount Coupon and GV redeem code, try to continue ... if taken to checkout_confirmation go back to checkout_payment and try to add GV amount to claim, try to continue

    etc. etc. etc.

    Results:
    Always should be able to redeem GV but never be able to have both Discount Coupon and GV amount to claim at the same time when you get to checkout_confirmation

    Issue to consider, I would, as a customer, be ticked off that I have a GV code (or balance) and a Discount Coupon and when I try to use them together I cannot so I would think about packing up my credit card and going home ...
    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!

 

 

Similar Threads

  1. Gift certificate and discount coupon time outs
    By polyestercowboy in forum General Questions
    Replies: 0
    Last Post: 1 Mar 2011, 05:28 PM
  2. Removing Gift Certificate and Discount Coupon links
    By IA7X ShadowsI in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Oct 2010, 11:23 PM
  3. 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
  4. 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
  5. Gift Certificate and Coupon Issue
    By gabenn2 in forum Bug Reports
    Replies: 21
    Last Post: 20 Jul 2007, 08:52 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