Use the following code: - (edited after some good codes from @clockworkgeek)
<?php
$primaryAddress = Mage::getSingleton('customer/session')->getCustomer()
->getPrimaryShippingAddress();
$ arrCountryList = Mage :: getModel ('directory / country_api') -> items ();
$ countryName = '';
foreach ($ arrCountryList as $ _eachCountryList) {
if ($ primaryAddress ['country_id'] == $ _eachCountryList ['country_id']) {
$ countryName = $ _eachCountryList ['name'];
break;
}
}
$countryName = Mage::getModel('directory/country')
->loadByCode($primaryAddress->getCountryId())
->getName();
echo '<br/>Street Address: '.$primaryAddress->getStreet();
echo '<br/>City: '.$primaryAddress->getCity();
echo '<br/>State/Region: '.$primaryAddress->getRegion();
echo '<br/>Country Code: '.$primaryAddress->getCountryId();
echo '<br/>Country Name: '.$countryName;
echo '<br/>Zip Code: '.$primaryAddress->getPostcode();
?>
/. , .
, .