- Posts: 135
- Thank you received: 2
Floating tax error with price ranges
11 years 7 months ago - 11 years 7 months ago #190843
by earmaster
Floating tax error with price ranges was created by earmaster
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
It seems that if you have activated the new floating tax feature, and have "Price Range" as price display option for product listing page, then HikaShop takes out a tax percentage on the product listing page. As soon as you click on one specific product, then the price is correct.
For rexample:
1. Product costs 100€ (final price incl taxes) and tax is calculated during checkout depending on user location
2. If option "Price range" is selected for display of product listing, then the price shown in the list of products becomes 100€ minus tax (80€ for example).
3. Click on product in question, and the price on the product details page is as expected (i.e. including tax)
-- Joomla version -- : 3.3.6
It seems that if you have activated the new floating tax feature, and have "Price Range" as price display option for product listing page, then HikaShop takes out a tax percentage on the product listing page. As soon as you click on one specific product, then the price is correct.
For rexample:
1. Product costs 100€ (final price incl taxes) and tax is calculated during checkout depending on user location
2. If option "Price range" is selected for display of product listing, then the price shown in the list of products becomes 100€ minus tax (80€ for example).
3. Click on product in question, and the price on the product details page is as expected (i.e. including tax)
Last edit: 11 years 7 months ago by earmaster.
Please Log in or Create an account to join the conversation.
11 years 7 months ago #191193
by nicolas
Replied by nicolas on topic Floating tax error with price ranges
HI,
Thank you for your feedback.
We were able to reproduce the issue and fix it.
Change the code:
to:
in the file administrator/components/com_hikashop/classes/currency.php and that should fix the problem.
Thank you for your feedback.
We were able to reproduce the issue and fix it.
Change the code:
Code:
$min->price_value_with_tax = $this->getTaxedPrice($min->price_value,$zone_id,$element->product_tax_id);
$min->taxes = $this->taxRates;
$max->price_value_with_tax = $this->getTaxedPrice($max->price_value,$zone_id,$element->product_tax_id);
$max->taxes = $this->taxRates;
Code:
if(empty($min->taxes_added)){
$min->price_value_with_tax = $this->getTaxedPrice($min->price_value,$zone_id,$element->product_tax_id);
$min->taxes = $this->taxRates;
$min->taxes_added = true;
}
if(empty($max->taxes_added)){
$max->price_value_with_tax = $this->getTaxedPrice($max->price_value,$zone_id,$element->product_tax_id);
$max->taxes = $this->taxRates;
$max->taxes_added = true;
}
The following user(s) said Thank You: earmaster
Please Log in or Create an account to join the conversation.
11 years 7 months ago - 11 years 7 months ago #191293
by earmaster
Replied by earmaster on topic Floating tax error with price ranges
Thanks a lot Nicolas, that fixed the problem on the products list page indeed!
It seems though that products with price ranges (one price per variant) still show the wrong price once put into the cart.
It seems though that products with price ranges (one price per variant) still show the wrong price once put into the cart.
Last edit: 11 years 7 months ago by earmaster. Reason: typo
Please Log in or Create an account to join the conversation.
11 years 7 months ago #191342
by nicolas
Replied by nicolas on topic Floating tax error with price ranges
Hi,
Change the code:
to:
in the same file and that should fix the problem.
Change the code:
Code:
$price->price_value_with_tax = $this->getTaxedPrice($price->price_value,$zone_id,$product_tax_id,$round);
$price->taxes = $this->taxRates;
Code:
if(empty($price->taxes_added)){
$price->price_value_with_tax = $this->getTaxedPrice($price->price_value,$zone_id,$product_tax_id,$round);
$price->taxes_added = true;
$price->taxes = $this->taxRates;
}
The following user(s) said Thank You: earmaster
Please Log in or Create an account to join the conversation.
11 years 7 months ago #191448
by earmaster
Replied by earmaster on topic Floating tax error with price ranges
That was fast. It's perfect, thank you! That fixed it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.185 seconds