我使用此代码:
$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');
我如何获得注册客户的公司名称?
感谢。
答案 0 :(得分:2)
检查属性名称是否真的是“公司”
joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left')