Pregunta

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

¿Fue útil?

Solución

You can try this:

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

Otros consejos

Try like this

$customerAddress->getCountryModel()->getName()
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top