Skip to main content

Floating tax error with price ranges

More
11 years 7 months ago - 11 years 7 months ago #190843 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)
Last edit: 11 years 7 months ago by earmaster.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191193 by nicolas
HI,

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;
to:
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; }
in the file administrator/components/com_hikashop/classes/currency.php and that should fix the problem.
The following user(s) said Thank You: earmaster

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago - 11 years 7 months ago #191293 by earmaster
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.
Last edit: 11 years 7 months ago by earmaster. Reason: typo

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191342 by nicolas
Hi,

Change the code:
Code:
$price->price_value_with_tax = $this->getTaxedPrice($price->price_value,$zone_id,$product_tax_id,$round); $price->taxes = $this->taxRates;
to:
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; }
in the same file and that should fix the problem.
The following user(s) said Thank You: earmaster

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191448 by earmaster
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
Powered by Kunena Forum