rounding problem

  • Posts: 13
  • Thank you received: 1
12 years 2 weeks ago #75212

Hi,

In our shop we recently discovered a strange rounding problem when the customer choses to pay with iDEAL: products that cost 5.95 (including 21% tax) give trouble on their own, products that cost 10.95, 15.95 or 20.95 if combined with other .95 products.
A total order amount of 106.70 (including tax & shipping) causes problems as well.
iDEAL shows a "hoeveelheid moet een geldig nummer zijn"-error, which basically means that it can't handle the rounding of this order.

Our iDEAL supplier is working on the problem.

In the mean time I keep wondering: wouldn't it be easier to just change the amount of decimals somewhere in the Hikashop configuration? In the system -> currency it's set to 2, but could I change this to 2 in currency.php as well? And if so: where and how? Or would that cause other rounding troubles?

I have considered downgrading from 1.6.0 to 1.5.8, since we didn't have these rounding issues with 1.5.8. Bad idea? Good idea? I don't know. I'm kinda desperate right now :( .

Last edit: 12 years 2 weeks ago by crommie.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
12 years 2 weeks ago #75285

We changed the tax calculations for 1.6.0 in order to have exact calculations.
Because of that, the data is now stored with as much decimals as possible and rounded during the display or when it is used by the payment plugin.
HikaShop payment plugins were already rounding the prices even before this modification so we didn't had to modify them.
It seems that your payment plugin isn't doing it. So it would require to change the code of the plugin to round the prices there.

Changing the decimals of the currency in HikaShop won't change anything since your plugin isn't taking it into account.

So it would be great to notify the developer of your payment plugin about that issue so that he can add the rounding (it should be really easy) in it.

If you downgrade HikaShop, the calculations will be the old ones and you won't have the problem anymore so that could indeed be a temporary solution.

The following user(s) said Thank You: crommie

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

  • Posts: 13
  • Thank you received: 1
12 years 2 weeks ago #75291

Thank you Nicolas! The iDEAL plugin developer has been notified (and could be working on it as we speak). I hope they will bring a permanent solution.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum