Checkout Total 1 Cent Off

  • Posts: 3
  • Thank you received: 0
9 years 4 months ago #208417

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.41
-- Browser(s) name and version -- : Chrome 43.0.2357.132 (64-bit)

Hi there,

We are testing our shopping cart before launch and for some groups of products, the total at checkout is 1 cent off. Please see the attached screenshot for an example. The total is displayed as $499.68 when it should be $499.67.

In the past, I was able to fix this issue by setting the "Round prices during calculations" (Hikashop > Configuration > Taxes) to "Yes," but this then affects calculation of taxes when the quantity of a product is greater than one.

Is there another way we can fix the 1-cent issue while still leaving the "Round prices during calculations" setting as "No"?

Thank you so much for your time!

Attachments:

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 4 months ago #208424

Hi,

The calculations are not off. They are correct. If you do all the calculations from the prices without taxes without rounding anything and that you only round the prices for the display you will see that the result is correct. If you do the sum of the elements displayed, it's possible that you see a discrepancy but that's normal since in that case you're doing the calculations with the rounding being done between each calculation instead of only at the end. If you look at your supermarket bills, the calculations are also usually done like that and in some cases, you can see a similar discrepancy in some cases between what you can calculate with the prices displayed on the receipt and the total amount paid.
Similarly, if you turn on that option and that you round all the prices between each calculation, you'll also see that the result is correct.
So there is no other way to change the calculations.

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

  • Posts: 3
  • Thank you received: 0
9 years 4 months ago #208533

Hi Nicolas,

Thank you so much for your response! Is there any way we can remove rounding between calculations so that rounding only happens with the total?

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 4 months ago #208535

Hi,

Yes and no. Turn off the "Round prices during calculations" setting and the rounding will only happens at the end during the display.
But you need to round all the prices. Otherwise, you'll end up with intermediary prices with 5 decimals or more. It will be even more confusing for customers.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum