すべての顧客住所属性を完全な顧客コレクションに結合したいと考えています。
$collection = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*');
$collection->joinField('is_active', 'customer/address', 'is_active','parent_id=entity_id');
致命的なエラーが表示されます:
Mage_Core_Exception: Can't retrieve entity config: customer/address in /app/Mage.php on line 563
私は Enterprise を使用しているため、顧客の住所属性を追加する機能があるため、次のコード スニペットのように特定の住所属性を結合する方法を使用しても満足のいくものではありません。
$collection->addNameToSelect()
->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
->joinAttribute('billing_telephone', 'customer_address/telephone', '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')
何か案は?ありがとうございました。