Magento - 获取注册客户的公司名称

时间:2010-12-23 12:12:07

标签: magento entity-attribute-value magento-1.4

我使用此代码:

$customerCollection = Mage::getResourceModel('customer/customer_collection')
->addNameToSelect()
->addAttributeToSelect('email')
->joinAttribute('postcode', 'customer_address/company', 'default_billing', null, 'left')
->joinAttribute('postcode', 'customer_address/postcode', 'default_billing', null, 'left')          
->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');

我如何获得注册客户的公司名称?

感谢。

1 个答案:

答案 0 :(得分:2)

检查属性名称是否真的是“公司”

joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left')