Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default coupon value error 1.3.6 (including tax)

    Not sure if this has been adressed before, it seems weird that nobody has noticed. But I had problems with the discount coupon showing the wrong value on a default 1.3.6 shop (display prices with tax set to true).

    I am quite sure it's a bug in ot_coupon.php, because $tax appears to hold the absolute tax value and is passed to zen_calculate_tax (which expects a tax percentage I assume).

    When I change (in ot_coupon.php):
    Code:
          if (DISPLAY_PRICE_WITH_TAX == 'true') {
            $od_amount['total'] += zen_calculate_tax($od_amount['total'], $tax);
          }
    To:
    Code:
          if (DISPLAY_PRICE_WITH_TAX == 'true') {
            //$od_amount['total'] += zen_calculate_tax($od_amount['total'], $tax);
            $od_amount['total'] += $tax;
          }
    It shows the correct discount amount including tax (in my case, only done one test until now though)

    #######################
    Note:

    Also the help popup (popup_coupon_help) shows the amounts (coupon value and minimum order amount) excluding tax while it should show including tax. Haven't looked into that yet.

  2. #2
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: coupon value error 1.3.6 (including tax)

    I just did some other tests. The fix works well for absolute discounts (showing prices including tax, using one tax rate), but for percentage discounts it does not help.

    Since I have no plans to use percentage discounts in the near future, I think I will leave it like this. If you need percentage discounts you may want to look at: http://www.zen-cart.com/forum/showthread.php?t=50014 (it's about group discounts, but maybe the discount coupon problems are related?)

  3. #3
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: coupon value error 1.3.6 (including tax)

    Is it possible to confirm, or deny, that the above fix is correct (by one of the developers)?

    I see others fixing the same issue like this:
    Code:
          if (DISPLAY_PRICE_WITH_TAX == 'true') {
    //        $od_amount['total'] += zen_calculate_tax($od_amount['total'], $tax);
            $od_amount['total'] += zen_calculate_tax($od_amount['total'], $tax_rate);
          }
    using the tax_rate, i.s.o. adding the calculate (absolute) tax value.

    But this seems unlogical to me since the programmer calculates the tax value just above the formentioned lines, and when the tax_rate is being used i.s.o. the tax, this calculated tax value is never being used!

    So it seems the programmer really intended to add this calculated tax value, not the rate.

  4. #4
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: coupon value error 1.3.6 (including tax)

    Paulm

    Haven;t had a chance to test the code yet, just wanted to say that I will do. I'm currently looking at the code for order totals anyway to try and wheedle out the few places that are still causing the infamous 0.01 bug(s) :)

    Ian

  5. #5
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: coupon value error 1.3.6 (including tax)

    Ok thanks for letting me know Ian,

    and hopefully this reports helps a little to make improvements.

 

 

Similar Threads

  1. v139h Coupon + Tax + paypal = error 10413
    By gothstone in forum PayPal Website Payments Pro support
    Replies: 3
    Last Post: 16 Jan 2013, 03:15 PM
  2. discount coupon tax error
    By Soniccc in forum General Questions
    Replies: 0
    Last Post: 21 Oct 2010, 01:52 PM
  3. Coupon error - with sales tax?
    By fright-rags in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 8 Apr 2010, 12:17 AM
  4. Logout is including tax & logged in is excluding tax
    By jcdk in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 15 Nov 2009, 02:59 PM
  5. Price including Tax value
    By Cylon in forum Basic Configuration
    Replies: 2
    Last Post: 11 Dec 2008, 02:37 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