### Wrong Total in Shopping Cart

My Opencart version 3.0.2.0
I use Four currencies. The default is Euro. Value of All currencies is up to two decimals: 1.170000 etc.
Store prices set in Euro are also up to two decimals: 3.9800 etc.
When proceeding the checkout in Euro everything is Okay.
When proceeding the checkout in other currency, there is often error with 0.01 in the total sum. Sometimes this error is in products Sum and sometimes it is in the sum product+shipping cost. I don't have any other taxes in the checkout.

For example:
Product 1 = 3.20CHF
Product 2 = 4.58CHF
Sub-Total: 7.77CHF (wrong with -0.01)

or:
Product 1 = 5.83USD
Shipping = 0.59USD
Total: 6.41USD (wrong with -0.01)

When the sum is wrong, the checkout results in error in connecting with the payment method page.
So, Opencart can not work with other currencies aside of the default.

Why is that? How to be solved?

Active Member

Posts

Joined
Fri Oct 13, 2017 4:43 pm

### Re: Wrong Total in Shopping Cart

Actually, it is clear what is the problem but how to be solved?
This is a real bug in Opencart!?!?

The products and the shipping are listed in shopping cart (and respectively in the invoice) rounded to two decimals, which is okay.
But the Sub-total and the Total are sum of not rounded prices.
For example: Default product price: 4.98EUR and Shipping 0.50EUR, when one changes the currency to USD (1EUR=1.17USD):
in the table and invoice it is rounded:
Product 1 = 5.83USD
Shipping = 0.59USD

but Opencart sums in the background:
Product 1 = 5.8266USD + Shipping = 0.585USD and then round it in the Total=6.41USD which is different from the sum of the prices in the table which is 6.42USD.
As a result, when the checkout is confirmed, the bank module doesn't accept it and opens error page.

How to make the cart to sum the initially rounded prices which are shown in the table?

Active Member

Posts

Joined
Fri Oct 13, 2017 4:43 pm

### Re: Wrong Total in Shopping Cart

Well, this Extension might be of help on such:
---
Price Rounding
https://www.opencart.com/index.php?rout ... n_id=10016
---
found here:
https://www.opencart.com/index.php?rout ... arch=round
---
This always has been a potential problem, as it looks, and
according to older topics, but I never made any tests, to be able to judge.
Good Luck!
Ernie
---

For Sale: Turnkey Top URLs with Opencart installed!
Latest Opencart LIGHT + V-Pro Test Site: http://www.hitline.info
Free OC Extensions from the largest Github OC Archive on Earth,
635 + free Repositories - from OC v.1.5.x up
on my Github Opencart Site: https://github.com/IP-CAM

Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

### Re: Wrong Total in Shopping Cart

Isn't it be easier somebody to tell me what code lines to change in some .php file?
I can't believe such a huge bug to exist and Opencart developers do nothing!
Shouldn't we tell the world that Opencart can't work with multiple currencies.

So, people, what is the solution?

Active Member

Posts

Joined
Fri Oct 13, 2017 4:43 pm

### Re: Wrong Total in Shopping Cart

No help!

Is this bug exist in other versions?
Should I downgrade to 2.0 or wait for new version?

Active Member

Posts

Joined
Fri Oct 13, 2017 4:43 pm
Who is online

Users browsing this forum: No registered users and 7 guests