Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34
  1. #21
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Tax + discount coupon BUG?

    Hi,

    I think that unfortunately the changes we made earlier have introduced thay bug.


    To fix, you will need to replace the
    function pre_confirmation_check in includes/modules/order_total/ot_coupon.php with



    PHP Code:
      function pre_confirmation_check($order_total) {
        global 
    $order;
        
    $od_amount $this->calculate_deductions($order_total);
        if (
    DISPLAY_PRICE_WITH_TAX == 'true')
        {
          return 
    $od_amount['total'];
        } else {
          return 
    $od_amount['total'] + $od_amount['tax'];      
        }
      } 

  2. #22
    Join Date
    Dec 2008
    Location
    Stockholm
    Posts
    29
    Plugin Contributions
    0

    Default Re: Tax + discount coupon BUG?

    Hello wilt

    Thank you once again! That did the trick. Now I only have one more question...

    If I use a 100% discount coupon that sets the order total to 0, the payment method remains the same in the last (3rd) step as the selected one in the 2nd step.

    If I use a discount coupon (fixed amount in $) that covers the whole order balance or more, the payment method is set to nothing in the 3rd step.

    What I would like (and need) for this to work is some kind of "Zero balance payment method". Is there any way of doing this? My PSP don't accept 0 balance calls, and there are other possible issues with this problem too...

    The best would be if zencart would skip the "selection of payment method step" (or hide it) if the order balance (after any discounts) equals to 0. Wouldn't it?

    Thanks again

    /Erik

  3. #23
    Join Date
    Dec 2008
    Location
    Stockholm
    Posts
    29
    Plugin Contributions
    0

    Default Re: Tax + discount coupon BUG?

    I have tried using the freecharger and the freshipping modules but they don't seem to help me...

    /E

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

    Default Re: Tax + discount coupon BUG?

    to fix the 100% discount coupon problem you need to replace

    function pre_confirmation_check in includes/modules/order_total/ot_coupon.php again with

    PHP Code:
      function pre_confirmation_check($order_total) {
        global 
    $order;
        
    $od_amount $this->calculate_deductions($order_total);
        if (
    DISPLAY_PRICE_WITH_TAX == 'true' && $od_amount['type'] != 'P')
        {
          return 
    $od_amount['total'];
        } else {
          return 
    $od_amount['total'] + $od_amount['tax'];      
        }
      } 

  5. #25
    Join Date
    Dec 2008
    Location
    Stockholm
    Posts
    29
    Plugin Contributions
    0

    Default Re: Tax + discount coupon BUG?

    Hi

    Now everything seems to work. I will move the bug fixes to my live site tonight and test everthing once again. Thank you for all the help.

    Are there any other critical bug fixes I need? I thougt the "check for latest version" in the admin would handle this, but it seems to be used only for major upgrades. As you know I run on 1.3.8a.

    /Erik

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

    Default Re: Tax + discount coupon BUG?

    Hi

    there is another bug related to shipping tax and coupons but this may not affect you with using DISPLAY_PRICES_WITH_TAX.

    I am however currently reworking some of the calculation logic, as currently the way code handles the difference between DISPLAY_PRICE_WITH_TAX = true/false is a little convoluted (as you can probably tell from the problems you encountered)

    Hopefully I will have that done in a day or few.

  7. #27
    Join Date
    Dec 2008
    Location
    Stockholm
    Posts
    29
    Plugin Contributions
    0

    Default Re: Tax + discount coupon BUG?

    Hello Wilt

    I came across another problem related to the ot_coupon module. Sometimes the discount sum is rounded wrong. I use 2 decimals for the currency (SEK). It seems like this bug only occurs when using multiple tax classes on the same order, but I΄m not sure about that...

    /Erik
    Attached Images Attached Images  

  8. #28
    Join Date
    Feb 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Tax + discount coupon BUG?

    Quote Originally Posted by wilt View Post
    there is another bug related to shipping tax and coupons but this may not affect you with using DISPLAY_PRICES_WITH_TAX.

    I am however currently reworking some of the calculation logic, as currently the way code handles the difference between DISPLAY_PRICE_WITH_TAX = true/false is a little convoluted (as you can probably tell from the problems you encountered)

    Hopefully I will have that done in a day or few.
    Hi Wilt,

    Did you get anywhere with this reworking? I'm attempting to solve a discount code and sales tax problem different to the ones fixed in this thread. The problem only occurs when DISPLAY_PRICES_WITH_TAX. I'm finding the code related to DISPLAY_PRICES_WITH_TAX quite confusing.

    Cheers

  9. #29
    Join Date
    Oct 2007
    Posts
    7
    Plugin Contributions
    0

    Default Re: Tax + discount coupon BUG?

    Hey there, sorry to dig up an old bug but..

    I am running a 1.3.9g shop (upgraded from 1.3.8a) and am seeing a similar problem to this.

    It occurs when redeeming a discount coupon with a higher value than the order total.

    e.g. fill up the cart with £47 worth of goods, and then redeem a £100 coupon, and instead of a discount value of £47.00 it takes off the shipping tax (£0.74 in my case), so you get:


    Sub-Total: £47.00

    Delivery Options (Standard Delivery: Free if Order Total above £100, £4.99 if under): £4.99

    Discount Coupon: HRLM : -£46.26

    VAT: £0.74

    Total: £5.73

    Is there a quick fix for this? Somewhere around line 403 in ot_coupon.php ?

    Thanks!

  10. #30
    Join Date
    Sep 2010
    Posts
    38
    Plugin Contributions
    0

    Default Re: Tax + discount coupon BUG?

    Hi!

    I have the same problem as ErikAllan had (i think). The difference is that i am running 1.3.9f and the ot_coupon.php is not the same as it were when you guys fixed it. I tried to implement the changes but nothing seems to happen.

    I have the following setup:

    Include Shipping
    false
    Include Tax
    false
    Re-calculate Tax
    Standard

    The problem i'm having is: the discount is wrongly calculated when there is VAT on the shipping.

    Heres an example of an order with VAT on shipping and an 10% coupon:

    Totalt:NOK 125.00
    Coupon: -NOK 11.23
    Shipping :NOK 63.75
    25% VAT: NOK 35.25
    Order Total: NOK 177.52

    The Coupon SHOULD be -NOK 12,50

    Here is the exact same order, but this time I have turned off VAT on shipping. Now everything is as it should be.

    Totalt:NOK 125.00
    Coupon: :-NOK12.50
    Shipping :NOK51.00
    25% VAT:NOK22.50
    Order Total:NOK163.50


    Anyone got an idea of how to fix this?

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 18
    Last Post: 12 Mar 2010, 06:37 PM
  2. Discount Coupon/Free - Tax Bug?
    By clane777 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 24
    Last Post: 8 May 2008, 06:43 PM
  3. Discount Coupon AND Group Discount Tax Problem
    By mrkrinkle in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 11
    Last Post: 5 Apr 2007, 12:16 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