Magento: Get currency code & currency rate
Here are the code snippets to get base currency code, default currency code, current currency code, all allowed currency code and current currency rate in Magento.
Base currency is the currency that is used for online transaction from your store.
Default currency is the currency used to display pricing in your store.
Current currency is the currency currently chosen by the user for displaying price in the store.
Get Base Currency Code
Get Default Currency Code
Get Current Currency Code
The following code fetches a list of all the allowed currencies.
Get Available/Allowed Currency Codes
$availableCurrencyCodes = Mage::app()->getStore()->getAvailableCurrencyCodes();
The following code fetches currency rate of current currency with respect to base currency. Suppose, your base currency is USD and your current currency is EUR. Current exchange rate is 1 USD = 0.86 EUR. Then, current currency rate will be 0.86.
Get Current Currency Rate
Hope this helps.