![](/img/trans.png)
[英]How do I get the value of the selected customer to echo <input> element?
[英]How Do I Get Customer Custom Attribute Value
当我运行以下两行代码时,我返回值161.现在,如果我通过customer_eav
挖掘,我看到161与attribute_id
477有关,然后如果我进一步挖掘到customer_entity_varchar
我会找到一个带有field['attribute_id']=477
的行field['attribute_id']=477
,价值为美元。 如何使用magento的模型/方法获取此属性字符串值...
$customer = $session->getCustomer();
$attributes = $customer->getDefaultCurrency(); // returns 161... not USD
echo $customer->getResource()
->getAttribute('default_currency')
->getFrontend()
->getValue($customer);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.