Post by vourlismenos » Wed Sep 10, 2025 4:20 pm

I'm using oc 3.0.3.2
Single currency.
I have two different tax rates (24% + 6%) and some countries have 0 tax.

The prices are rounded to 2 decimals, but in order to get "correct" prices displayed with tax, the prices in the products are input with 4 decimals.

The problem is that in some cases there is a tiny difference of 0.01.

The issue is that even though the prices are rounded to 2 decimals, the calculation are made before the rounding.
The sub total and total are the the sum of the prices with the 4 decimals, not the rounded prices with the two decimals.

I suspect that this is causing and additional issue with paypal.
I had an order of €51.499 (rounded to 51.50) but paypal charged 51.51.
Probably the un-rounded sum was transfered over to paypal which might have rounded it in a different way and added an extra 0.01.

Any ideas if it's fixable?
Last edited by vourlismenos on Wed Sep 10, 2025 11:33 pm, edited 1 time in total.

New member

Posts

Joined
Wed Dec 05, 2018 5:01 pm

Post by ADD Creative » Wed Sep 10, 2025 6:46 pm

If single currency you would probably be able to round the totals to the required number of decimal places before adding together. Try searching the forum or GitHub as they may be some examples.

I believe there may also be some extensions in the marketplace that claim to fix the issue.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by vourlismenos » Wed Sep 10, 2025 7:59 pm

I only found this: viewtopic.php?p=881144#p881144
which it was not very clear (at least for me)

But I completely forgot to check the extensions.
This seems to do exactly what I need: https://www.opencart.com/index.php?rout ... h=rounding

And this might cover the paypal issue, even though I'm not sure if they can play together
https://www.opencart.com/index.php?rout ... h=rounding
ADD Creative wrote:
Wed Sep 10, 2025 6:46 pm
If single currency you would probably be able to round the totals to the required number of decimal places before adding together. Try searching the forum or GitHub as they may be some examples.

I believe there may also be some extensions in the marketplace that claim to fix the issue.

New member

Posts

Joined
Wed Dec 05, 2018 5:01 pm

Post by by mona » Wed Sep 10, 2025 8:02 pm

You have many options in the thread you found and commented on - why ask again ?

I am sure you also find it more difficult to find solutions when duplicate questions are found only to find previous questions link them to this thread and suggest you do those first.

viewtopic.php?t=205399

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by by mona » Wed Sep 10, 2025 8:09 pm

vourlismenos wrote:
Wed Sep 10, 2025 7:59 pm
I only found this: viewtopic.php?p=881144#p881144
which it was not very clear (at least for me)
If you require more than that you will need to ask for custom work. It gives you a modification to copy and paste for example - cant really provide much more than that unless you want someone to actually install it and test it for you ?

The thread also provides an extension - did you read the thread? - you can also use google translate if that is an issue.
vourlismenos wrote:
Wed Sep 10, 2025 7:59 pm
But I completely forgot to check the extensions.
This seems to do exactly what I need: https://www.opencart.com/index.php?rout ... h=rounding

And this might cover the paypal issue, even though I'm not sure if they can play together
https://www.opencart.com/index.php?rout ... h=rounding
ask the developers of the extensions and check compatibility - we are not associated or paid by opencart - we can not go into the extensions and check and even if we could - we should not be expected to. Always try your best first - it is the best way to get the best out of us.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by vourlismenos » Wed Sep 10, 2025 8:10 pm

I found 1 option, from 2021 that was not very clear and did not work for me.
I posted there but since it was a "cold" thread not marked "SOLVED" I didn't think I would get a reply. And I didn't, apart from yours which was just a smart comment.

I made a new thread, providing my info, which were a bit different from the original.
I apologise for not thinking about checking the extensions first. I will proceed to flog myself and hope that you will forgive me.



by mona wrote:
Wed Sep 10, 2025 8:02 pm
You have many options in the thread you found and commented on - why ask again ?

I am sure you also find it more difficult to find solutions when duplicate questions are found only to find previous questions link them to this thread and suggest you do those first.

viewtopic.php?t=205399
Last edited by vourlismenos on Wed Sep 10, 2025 8:18 pm, edited 1 time in total.

New member

Posts

Joined
Wed Dec 05, 2018 5:01 pm

Post by by mona » Wed Sep 10, 2025 8:16 pm

I understand your logic - but we have to ask you to put [SOLVED] to the title.
So this is what I suggest : on the other thread you have a good solution which i suspect will work as you want - if it does change this title to include [SOLVED] with the link that it is solved in ======= >>>>>>>

viewtopic.php?t=205399&start=20

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by vourlismenos » Wed Sep 10, 2025 8:23 pm

The moment I confirm that the extension is working and solving the issue, I will change the title to [SOLVED]
by mona wrote:
Wed Sep 10, 2025 8:16 pm
I understand your logic - but we have to ask you to put [SOLVED] to the title.
So this is what I suggest : on the other thread you have a good solution which i suspect will work as you want - if it does change this title to include [SOLVED] with the link that it is solved in ======= >>>>>>>

viewtopic.php?t=205399&start=20

New member

Posts

Joined
Wed Dec 05, 2018 5:01 pm

Post by paulfeakins » Wed Sep 10, 2025 11:28 pm

vourlismenos wrote:
Wed Sep 10, 2025 4:20 pm
I'm using oc 3.0.3.2
...
The problem is that in some cases there is a tiny difference of 0.01.
...
Any ideas if it's fixable?
Yep, this should fix it: https://www.antropy.co.uk/blog/paypal-s ... nt-in-tot/

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by vourlismenos » Wed Sep 10, 2025 11:36 pm

Can this be used alongside the Rounding Bug Fix or is it affecting the oc rounding as well?

paulfeakins wrote:
Wed Sep 10, 2025 11:28 pm
vourlismenos wrote:
Wed Sep 10, 2025 4:20 pm
I'm using oc 3.0.3.2
...
The problem is that in some cases there is a tiny difference of 0.01.
...
Any ideas if it's fixable?
Yep, this should fix it: https://www.antropy.co.uk/blog/paypal-s ... nt-in-tot/

New member

Posts

Joined
Wed Dec 05, 2018 5:01 pm
Who is online

Users browsing this forum: Ahrefs [Bot] and 39 guests