Pergunta

How can I get the country short code (ISO) of the billing address of a logged in customer. Can anyone help? Thanks!

Foi útil?

Solução

You can try this:

$session = Mage::getSingleton('customer/session');
if ($session->isLoggedIn()) {
    $countryCode = $session->getCustomer()->getDefaultBillingAddress()->getCountry();
}

Outras dicas

Try like this

$customerAddress->getCountryModel()->getName()
Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top