Hello, we have a rounding issue I'm unable to get to the bottom of. I can't be the first to have experienced this issue but I haven't been able to find a solution yet.
We have a product whose price is £1.71 ex Vat.
Plus 20% Vat is £2.052.
The store shows £2.05.
The customer wants to order 60 and rightly expects the price to be 60 x £2.05 = £123
But of course Opencart calculates 60 x £2.052 with the result being £123.12
Short of setting all products such that their plus vat price gives me clean whole numbers I don't know what else I can do that doesn't involve modifying the base Opencart code and I'd rather not do that unless absolutely necessary.
As you have probably found from searching the form, the workarounds are as you have suggested. To change the ex. tax price so when tax is added the result is nicer number. This probably won't help if selling in multiple currencies.
Or to make changes to the code for total calculations to add rounding or calculate the total after formatting for display. These changes would be need to be made in quite a few places, such as cart, checkout, admin, payment modules, etc.
The only other option would be to change the 'Decimal Places' setting for that currency to be more than 2. This might be undesirable visually and might just push the issue to the next decimal place, depending on your prices. Some payment modules may have issue with the change in decimal places.
Or to make changes to the code for total calculations to add rounding or calculate the total after formatting for display. These changes would be need to be made in quite a few places, such as cart, checkout, admin, payment modules, etc.
The only other option would be to change the 'Decimal Places' setting for that currency to be more than 2. This might be undesirable visually and might just push the issue to the next decimal place, depending on your prices. Some payment modules may have issue with the change in decimal places.
How does everyone else deal with this? Do you just hope the customer doesn't notice or care as the differences are usually insignificant?
I feel that modifying the core Opencart files to fix this is a recipe for disaster, and I don't even know exactly which files I'd need to amend in order to even achieve this. It surprises me that there are no extensions to fix this either, seems like it should be a bigger deal.
I feel that modifying the core Opencart files to fix this is a recipe for disaster, and I don't even know exactly which files I'd need to amend in order to even achieve this. It surprises me that there are no extensions to fix this either, seems like it should be a bigger deal.
It depends what the store is selling. If they are selling larger value items that only get 1 or 2 purchased at a time, it's not likely that anyone will notice it to be to be an issue.
Some sites are business 2 business 2 display prices ex. VAT anyway, so again less likely to notice. One site I know is modified the cart to display the prices ex. VAT even when product prices displayed prices including VAT.
Some sites are business 2 business 2 display prices ex. VAT anyway, so again less likely to notice. One site I know is modified the cart to display the prices ex. VAT even when product prices displayed prices including VAT.
Who is online
Users browsing this forum: No registered users and 47 guests