Magento:获取 EAV 属性选项/选择的值
我有一个 Mage_Customer_Model_Customer 对象并运行以下代码:
$customer->loadByEmail($customer->getEmail());
$customer->getGender(); //returns the EAV attribute option_id's of 1 or 2
我正在尝试获取这些 option_id 的 eav_attribute_option_value.value,即单词“男性”或单词“女性”
我不知道如何执行此操作并花费了相当多的时间调试帐户表单选择小部件的时间没有成功。我也很好奇你是怎么想出来的。
预先感谢
真诚的, 疲惫的开发者
I Have an object of Mage_Customer_Model_Customer and ran the following code:
$customer->loadByEmail($customer->getEmail());
$customer->getGender(); //returns the EAV attribute option_id's of 1 or 2
I am trying to get the eav_attribute_option_value.value of those option_id's which is the word "Male" or the word "Female"
I am not sure how to do this and spent quite a bit of time debugging the account form select widget with no success. I am also curious on how you figured this out.
Thanks in advance
Sincerly,
Tired Dev
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://blog.chapagain.com。 np/magento-how-to-get-attribute-name-and-value/
编辑:来自链接:
http://blog.chapagain.com.np/magento-how-to-get-attribute-name-and-value/
EDIT: From Link: