- Posts: 209
- Thank you received: 18
Strange rounding problem on product
15 years 7 months ago #6770
by JIK
Strange rounding problem on product was created by JIK
I have a product that sells for $280.00 including tax. In admin, when I enter this price into "Price with tax" field in the product setup, it calculates the pre-tax price to be $254.54545. Okay.
But when I look at the product's page in my store it shows the price as $280.01.
I have played with just about every variation of the pre-tax number but I can't get the product to show exactly $280.00.
In my category-products listing module it shows the price correctly as $280.00, but when added to the cart it lists the product at $280.01 in the cart.
How do I get rid of the 1 cent????
cheers!
But when I look at the product's page in my store it shows the price as $280.01.
I have played with just about every variation of the pre-tax number but I can't get the product to show exactly $280.00.
In my category-products listing module it shows the price correctly as $280.00, but when added to the cart it lists the product at $280.01 in the cart.
How do I get rid of the 1 cent????
cheers!
Please Log in or Create an account to join the conversation.
15 years 7 months ago #6787
by nicolas
Replied by nicolas on topic Re: Strange rounding problem on product
Hi,
There is currently a price calculation rounding issue in HikaShop. You can look at that thread for more information and how to go around the problem:
www.hikashop.com/en/support/forum/4-how-...culation-solved.html
There is currently a price calculation rounding issue in HikaShop. You can look at that thread for more information and how to go around the problem:
www.hikashop.com/en/support/forum/4-how-...culation-solved.html
Please Log in or Create an account to join the conversation.
15 years 7 months ago #6865
by JIK
Replied by JIK on topic Re: Strange rounding problem on product
Ok, from that thread I made the changes to adminsitrator/components/com_hikashop/classes/currency.php and administrator/components/com_hikashop/controllers/product.php
but I am still getting a price of $280.01 on the product page. So, no change.
????
but I am still getting a price of $280.01 on the product page. So, no change.
????
Please Log in or Create an account to join the conversation.
15 years 7 months ago #6880
by nicolas
Replied by nicolas on topic Re: Strange rounding problem on product
please look in the file adminsitrator/components/com_hikashop/classes/currency.php in the function addTax near the end of the file. Could you try to remove the line:
$price->price_value = round($price->price_value,$round);
and see if the price is correct after that?
$price->price_value = round($price->price_value,$round);
and see if the price is correct after that?
Please Log in or Create an account to join the conversation.
15 years 7 months ago #6951
by JIK
Replied by JIK on topic Re: Strange rounding problem on product
Perfect, that fixed it! Thanks heaps!
cheers!
cheers!
Please Log in or Create an account to join the conversation.
Time to create page: 0.219 seconds