質問

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

役に立ちましたか?

解決

You can try this:

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

他のヒント

Try like this

$customerAddress->getCountryModel()->getName()
ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top