Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jul 2011
    Posts
    72
    Plugin Contributions
    0

    Default Coupon error at checkout

    I have a coupon set up to discount a certain amount on a certain product. Under the restrictions I have denied Top and allowed the product. For some reason at checkout I get the following error message "You must spend at least $14.97 to redeem this coupon". My cart total is $23.96 and I have included the product that is to be discounted. What am I doing wrong?

    Thanks,

    JNB41578

  2. #2
    Join Date
    Jul 2011
    Posts
    72
    Plugin Contributions
    0

    Default Re: Coupon error at checkout

    My coupon is setup the following way:

    Discount: 5.99
    Minimum: 14.97
    Free Shipping: NOT Checked
    Dates are correct

    RESTRICTIONS:

    TOP- Deny
    Product: Allowed

    Using v1.50


    I tried some troubleshooting on my own for awhile. If I remove the denied TOP, deny the category that the product is in, the coupon works. If I go to my cart and remove the product that is allowed, the coupon still deducts the amount.

    Any help would be great!

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

    Default Re: Coupon error at checkout

    Have you an URL to your site where we could perhaps test this coupon?

    What products_id is this Discount Coupon Valid for?

    NOTE: Minimum is referring to the value of the Product(s) settings that are valid for the Discount ...
    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!

  4. #4
    Join Date
    Jul 2011
    Posts
    72
    Plugin Contributions
    0

    Default Re: Coupon error at checkout

    Site: www.svgattic.com

    Product id: 255

    Thanks for replying!

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

    Default Re: Coupon error at checkout

    The Product that you allow is priced at: $5.99

    However, you want a Minimum at $14.97 ...

    The Minimum is meant to be the minimum of the Price(s) of the Products Allowed, not the Minimum of the Order ...

    You would need to customize the code to work with the validation for the Minimum to be the Minimum of the whole Order and not the amount of the Valid Allowed Product(s) ...
    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!

  6. #6
    Join Date
    Jul 2011
    Posts
    72
    Plugin Contributions
    0

    Default Re: Coupon error at checkout

    I want to be able to offer the free gift with a minimum purchase of $9.98. This is exactly how I did the coupons in v1.39, I recently upgraded to v1.50. Was there a change? I don't remember seeing documentation on it. Anyhow, I don't understand your response about me having to customize the code. If you could point me in the right direction that would be great because I thought I was customizing it in the restrictions.

    Thanks in advance!

  7. #7
    Join Date
    Jul 2011
    Posts
    72
    Plugin Contributions
    0

    Default Re: Coupon error at checkout

    Also, everything I have read up on in this forum tells me that the minimum is the minimum of the total order you want your customer to spend before the discount is allowed to be applied.

  8. #8
    Join Date
    Jul 2011
    Posts
    72
    Plugin Contributions
    0

    Default Re: Coupon error at checkout

    Quote Originally Posted by Ajeh View Post
    The Product that you allow is priced at: $5.99

    However, you want a Minimum at $14.97 ...

    The Minimum is meant to be the minimum of the Price(s) of the Products Allowed, not the Minimum of the Order ...

    You would need to customize the code to work with the validation for the Minimum to be the Minimum of the whole Order and not the amount of the Valid Allowed Product(s) ...
    Ajeh,
    I went in and changed the minimum order amount to the item amount per your suggestion that the coupon would then work. Unfortunately, I am still getting the error, except now it says I must spend at least $5.99. Any help would be great.

    Thanks again!

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

    Default Re: Coupon error at checkout

    You can try this ...

    Update the code in:
    /includes/modules/order_total/ot_coupon.php

    And add the code in RED to the function get_order_total:
    Code:
        if (DISPLAY_PRICE_WITH_TAX != 'true')
        {
          $orderTotal -= $order->info['tax'];
        }
    
    // bof: calculate Order Total less shipping and tax
    // change what total is used for Discount Coupon Minimum
    $orderTotalFull = $order->info['total'];
    //echo 'Current $orderTotalFull: ' . $orderTotalFull . ' shipping_cost: ' . $order->info['shipping_cost'] . '<br>';
    $orderTotalFull -= $order->info['shipping_cost'];
    //echo 'Current $orderTotalFull less shipping: ' . $orderTotalFull . '<br>';
    $orderTotalFull -= $orderTotalTax;
    //echo 'Current $orderTotalFull less taxes: ' . $orderTotalFull . '<br>';
    
    // add $orderTotalFull to array
        return array('totalFull'=>$orderTotalFull,'orderTotal'=>$orderTotal, 'orderTaxGroups'=>$orderTaxGroups, 'orderTax'=>$orderTotalTax, 'shipping'=>$order->info['shipping_cost'], 'shippingTax'=>$order->info['shipping_tax']);
    // eof: calculate Order Total less shipping and tax
      }
    Next, change the code by reversing the commented code in the function collect_post from:
    Code:
    // left for total order amount vs qualified order amount just switch the commented lines
    //        if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
            if (strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
    to be:
    Code:
    // left for total order amount vs qualified order amount just switch the commented lines
            if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
    //        if (strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
    and see if this now works for you based on the Total of the Order (less shipping and tax) vs the Total of the Products allowed ...
    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!

  10. #10
    Join Date
    Jul 2011
    Posts
    72
    Plugin Contributions
    0

    Default Re: Coupon error at checkout

    Thank you Ajeh,

    Unfortunately that did not work. It says "Congratulations your discount was accepted" or something like that, but it does not discount the coupon at all.

    And it slowed down a lot after adding that code in.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Checkout with coupon when no coupon is offered, Google Checkout
    By mohammed.khalilia in forum Addon Payment Modules
    Replies: 1
    Last Post: 8 Nov 2011, 01:11 AM
  2. I get this error on my discount coupon at checkout:'This coupon is not available yet'
    By WHHammond in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 13
    Last Post: 15 Sep 2010, 03:09 PM
  3. Google Checkout Coupon Error
    By NBordeau in forum General Questions
    Replies: 0
    Last Post: 3 May 2010, 12:41 AM
  4. Google Checkout Coupon Error
    By NBordeau in forum Addon Payment Modules
    Replies: 6
    Last Post: 3 May 2010, 12:29 AM
  5. Coupon checkout total error
    By gonewild in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 16 Nov 2006, 02:00 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