Strange rounding problem on product

  • Posts: 205
  • Thank you received: 18
  • Hikashop Business
11 years 6 months ago #6770

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!

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

  • Posts: 76113
  • Thank you received: 11909
  • MODERATOR
11 years 6 months ago #6787

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

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

  • Posts: 205
  • Thank you received: 18
  • Hikashop Business
11 years 6 months ago #6865

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.

????

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

  • Posts: 76113
  • Thank you received: 11909
  • MODERATOR
11 years 6 months ago #6880

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?

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

  • Posts: 205
  • Thank you received: 18
  • Hikashop Business
11 years 6 months ago #6951

Perfect, that fixed it! Thanks heaps!

cheers!

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

Time to create page: 0.065 seconds
Powered by Kunena Forum