$customer = Mage::getSingleton('customer/session')->getCustomer(); //获取顾客的信息
$countryCode = $customer->getDefaultBillingAddress()->getCountry(); //获取顾客国家的信息,这里一般获取到的都是缩写,例如:US
$country = Mage::getModel('directory/country')->loadByCode($countryCode); //获取国家对象
$countryName = $country->getName(); //获取到国家名称
magento获取当前用户的国家属性及各种用户属性
最新推荐文章于 2019-10-08 16:45:26 发布