Currency logic (nopCommerce 2.40)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Something unexpected happened in a shop that I am testing. The whole order process showed a price (say 30 EUR) which is also the price seen in the shop etc. But then in the order details and the confirmation mail there was suddenly a price of 20.40 EUR.

I guessed this was a conversion from USD to EUR, but I knew my primary currency is set to EUR.

So I updated the factor for EUR to 1.00, which resolved the issue. However, I would have expected that no matter what the factor is, there is never a numerical value change when we do everything in the same currency, because there is no conversion and no conversion costs involved.

At the very least the conversion should include the factor of the primary currency.

Say that USD is 1.00 and EUR is 0.68. EUR is set as the primary currency and I want a dollar price as a user. The shop should know to divide by the primary currency and multiply by the desired currency. I.e.:

20 EUR = (20 / 0.68) * 1.00 = 29.42 (rounded up to 2 decimal places)

By the same logic the bug I saw should disappear when I have a factor different from the 0.68:

20 EUR = (20 / 0.68) * 0.68 = 20 EUR

Anyway, my issue is fixed, but I am surprised is was an issue in the first place. Thank you for reading my report.
12 years ago
wouter wrote:
Something unexpected happened in a shop that I am testing. The whole order process showed a price (say 30 EUR) which is also the price seen in the shop etc. But then in the order details and the confirmation mail there was suddenly a price of 20.40 EUR.

I guessed this was a conversion from USD to EUR, but I knew my primary currency is set to EUR.

So I updated the factor for EUR to 1.00, which resolved the issue. However, I would have expected that no matter what the factor is, there is never a numerical value change when we do everything in the same currency, because there is no conversion and no conversion costs involved.

At the very least the conversion should include the factor of the primary currency.

Say that USD is 1.00 and EUR is 0.68. EUR is set as the primary currency and I want a dollar price as a user. The shop should know to divide by the primary currency and multiply by the desired currency. I.e.:

20 EUR = (20 / 0.68) * 1.00 = 29.42 (rounded up to 2 decimal places)

By the same logic the bug I saw should disappear when I have a factor different from the 0.68:

20 EUR = (20 / 0.68) * 0.68 = 20 EUR

Anyway, my issue is fixed, but I am surprised is was an issue in the first place. Thank you for reading my report.


Your primary currency exchange rate should be set to 1. Check https://www.nopcommerce.com/boards/t/13610/currency-exchange-rate-for-primary-store-currency.aspx
and https://www.nopcommerce.com/boards/t/12868/error-in-display-of-prices.aspx
12 years ago
I understand that is what will make it work. But don't you agree there should at least be a warning if you save something as your primary currency when the factor is set to something other than 1?
12 years ago
wouter wrote:
I understand that is what will make it work. But don't you agree there should at least be a warning if you save something as your primary currency when the factor is set to something other than 1?

Yes, you are right
12 years ago
wouter wrote:
I understand that is what will make it work. But don't you agree there should at least be a warning if you save something as your primary currency when the factor is set to something other than 1?

Go to admin area > system > warnings. You'll see the appropriate warning
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.