Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Currency rounding


bigg

Recommended Posts

Just a simple problem that I cant seem to be able to fix.

 

While default currency is declared EEK and there are 2 additional currencies available - EUR and USD.

 

When I add for instance 10 items to my cart with a price of $0.08 then the total of them becomes $0.76?

I have tried to tweak currencies.php but nothing useful happens, tried to look around and rounding just keeps doing its own stuff.

 

I just want to declare that the prices are rounded always to 2 decimal places.

 

Any help?

 

bigg

http://www.magic.ee/

Magic, thats the story...

http://www.magic.ee/

Link to comment
Share on other sites

how about "updating currencies"  in admin > valuta?

Well, that does not help because of the big difference in currency rates.

 

As I have been looking into this problem I have found out following cases:

 

Currency conversion takes place only woth total numbers so if I have 1 product it's correct.

Example again in Shopping Cart -> total 10EEK -> 0.64EUR. Unit price is accordingly -> 1EEK -> 0.06EUR.

 

Shopping Cart Class retrieves prices directly from Products table and calculates the total. The actual conversion to another currency takes place only at visual side so the calculation is made only to the sub-total.

 

How to force Shopping Cart Class to use currencies in single item calculations?

So it would work like Price(0.06EUR) * Qty(10) instead of Price(1EEK)*Qty(10)?

 

bigg

http://www.magic.ee/

Magic, thats the story...

http://www.magic.ee/

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...