Magento currency ‘USD’ not found

Saturday, 3. December 2011

After restarting the memcached – I received this error and here how I went about resolving this.

Run Compiler Again

Systems > Tools > Compilation > Run compiler

Flush the Cache

The System > Cache management > Flush Cache Storage.

Alternatively:
Remove all the files from var/* (especially cache, locks and sessions)

If you are running Memcache – You may want to

killall memcache

Then: restart again

/usr/local/nserver/memcached/bin/memcached -d -uroot -m512 -p11211 start

Magento and Currencies – Get the correct currency symbol and code programatically

Thursday, 28. July 2011

In e-commerce business and business in general, you have got to get the currencies right or you are doomed!

In a multi-store environment, it is even more important to be able to automatically change the currency symbols for your current customers depending on their location. This is even more true, if you are doing international business.

Here are my tips on how to get the correct currency code and symbol per store.

Get currency symbol for current store:

Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();

Get currency symbol for a specify currency code:

  Mage::app()->getLocale()->currency('EUR')->getSymbol();

Get currency code for current store:

Mage::app()->getStore()->getCurrentCurrencyCode();

ATTENTION:
You will have to set the correct locale in the backend to ensure Magento works correctly. Here is how to do it.

1) Navigate to: System > Configuration > General > Locale.

2) Choose the Timezone and Locale for each store.