Danya
Danya

Reputation: 11

Magento - I get "Undefined rate from GBP-USD" when doing currencyConvert

I am trying to do:

$amount = Mage:helper('directory')->currencyConvert($amount,$fromCurrency,$toCurrency);

It is working fine when the "Base Currency: USD" and "Default Display Currency: EUR", but when I replace "EUR" with "GBP" I get this exception: "Undefined rate from GBP-USD" when doing currencyConvert

Both EUR and GBP rates exist.

Upvotes: 1

Views: 2216

Answers (2)

minlare
minlare

Reputation: 2654

In Magento you cannot convert "Your Currency" to the "Base Currency".

See these answers from WaPoNe for more details and possible solution. https://magento.stackexchange.com/questions/34548/currency-convertor

magento - convert order amount from current currency to base currency

Upvotes: 0

Amit Bera
Amit Bera

Reputation: 7611

Dayna,You was not properly configure currencies. Please select multiple currencies from admin> system>configuration and also, setting the currency rate from admin>manage currency>

Upvotes: 1

Related Questions