Get Country from Country Code

Posted: September 21, 2010 in Magento, Version 1.3.*, Version 1.4.*

Hi All
If you have to find Country from CountryCode
Here is the code for you…

$countryModel = Mage::getModel(‘directory/country’)->loadByCode(‘country_code’);

$countryName = $countryModel->getName();

I hope this will help you
Thanks ..
-Bijal Bhavsar 🙂

  1. A.T. says:

    Awesome!! Thanks a lot – it definitely helped, exactly what I was trying to find 🙂

  2. Adam Malkin says:

    Thanks, this savedme loads of time

  3. subhra says:

    Thanks, for the code its really helpful

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s