Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Posts
    16
    Plugin Contributions
    0

    help question Problem with tax calculation on Tax Exempt goods

    I'm having a problem when redeeming discount coupons at the checkout.
    Most of my goods are Tax Exempt (ie food) and I get this error
    "Warning: Division by zero in /home/dalesbut/public_html/store/includes/modules/order_total/ot_coupon.php on line 364" when trying to redeem a coupon.
    After I tested redeeming a coupon against taxable goods there is no problem. So I know the problem is with the php code as it throwing up an error because the calculation is trying to divide something by zero.

    Is there any way of getting around this?

    Help much appreciated.

    Vicky

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

    Default Re: Problem with tax calculation on Tax Exempt goods

    Try changing the line:
    Code:
                $ratioTax = $adjustedTax/$order->info['tax'];
    to read:
    Code:
                $ratioTax = (isset($order->info['tax']) && $order->info['tax'] != 0) ? $adjustedTax/$order->info['tax'] : 0;
    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
    Sep 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: Problem with tax calculation on Tax Exempt goods

    Thank you very much - That sorted it

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

    Default Re: Problem with tax calculation on Tax Exempt goods

    Thanks for the update that this worked for you on the division by zero error on the Discount Coupons ot_coupons ...
    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. Tax Calculation Problem with Discount Codes
    By fergusmacdonald in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 10 Mar 2010, 07:19 PM
  2. Problem with Tax calculation
    By ianhg in forum General Questions
    Replies: 7
    Last Post: 27 Apr 2009, 09:09 PM
  3. Replies: 53
    Last Post: 7 Mar 2009, 09:48 AM
  4. Major problem with Zone configurations, VAT and tax exempt
    By promakeupstore in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 30 Sep 2008, 08:31 AM
  5. Replies: 0
    Last Post: 13 Jun 2008, 12:57 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