AbanteCart Community

Shopping Cart Operations => Support => Topic started by: marshcycle on January 27, 2013, 05:05:44 PM

Title: Tax not calculating correctly after 1.1.3 update
Post by: marshcycle on January 27, 2013, 05:05:44 PM
Hello,

When customers select one product, the tax is calculating correctly, but when they select multiple products it calculates the tax based on only the last item/qty added to the cart NOT the sub-total as it should!!

Please help. I'm having to cover the tax differences owed.

Thank you!
Title: Re: Tax not calculating correctly after 1.1.3 update
Post by: abantecart on January 28, 2013, 06:43:42 AM
We are checking...

In 1.1.3 there are additional settings to control tax calculation. I wonder if there is something wrong in the tax and location. Do you have correct tax class sett for your products (the once that are not calculated right)?

Title: Re: Tax not calculating correctly after 1.1.3 update
Post by: marshcycle on January 28, 2013, 07:28:18 AM
Well, my products are all set as "Taxable Goods". It is a shopping cart for my small winery and when they place how many of a particular type of wine they want and stick to JUST that wine, taxes are calculated perfectly for my zone which is for Placer County and is 7.5%.

BUT...when they select lower priced wine after they've selected the higher priced wine, the tax is calculated anew for the lesser amount of wine and not added together.

I have posted a screenshot of how my tax rate is configured.

Thank you.
Title: Re: Tax not calculating correctly after 1.1.3 update
Post by: abantecart on January 28, 2013, 10:56:13 AM
Problem is solved. There is a typo in the cart class. :(

Open this file /core/lib/cart.php

Locate line:
Code: [Select]
if (!isset($taxes[$product['tax_class_id']])) {
$this->taxes[$product['tax_class_id']]['total'] = $product['total'];
$this->taxes[$product['tax_class_id']]['tax'] = $this->tax->calcTotalTaxAmount($product['total'], $product['tax_class_id']);
Replace with:
Code: [Select]
if (!isset($this->taxes[$product['tax_class_id']])) {
$this->taxes[$product['tax_class_id']]['total'] = $product['total'];
$this->taxes[$product['tax_class_id']]['tax'] = $this->tax->calcTotalTaxAmount($product['total'], $product['tax_class_id']);
Title: Re: Tax not calculating correctly after 1.1.3 update
Post by: marshcycle on January 28, 2013, 04:28:52 PM
I located it and replaced it and now I can't even log into my admin panel.

I get this message:

Parse error: syntax error, unexpected T_PUBLIC in /home/content/52/7803852/html/store/core/lib/cart.php on line 390

Please help. cart.php code attached.

Thank you...
Title: Re: Tax not calculating correctly after 1.1.3 update
Post by: abantecart on January 29, 2013, 02:31:15 AM
You did not follow instructions and messed up the code.   ;)
Use attached file to replace file on your cart.
Title: Re: Tax not calculating correctly after 1.1.3 update
Post by: marshcycle on January 29, 2013, 03:55:13 PM
EXCELLENT...!! Problem solved...!

Thank you VERY much...!

 ;D

Case closed!!