0
我使用HWG屬性管理器爲客戶添加自定義屬性。即IDNumber。在Magento的訂單網格上顯示自定義屬性
http://www.magentocommerce.com/magento-connect/custom-attributes-4340.html
因此,如果客戶在管理作出的命令,在命令格,我想這個屬性。我遇到問題。有沒有人試過這個?
添加的屬性在數據庫中的customer_entity_varchar
。
我想這一點,
protected function _prepareCollection()
{
$collection = Mage::getResourceModel('customer/customer_collection')
->addNameToSelect()
->addAttributeToSelect('email')
->addAttributeToSelect('created_at')
->addAttributeToSelect('group_id')
->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');
$this->setCollection($collection);
return parent::_prepareCollection();
}
protected function _prepareColumns()
{
$this->addColumn('entity_id', array(
'header' => Mage::helper('customer')->__('ID'),
'width' => '50px',
'index' => 'entity_id',
'type' => 'number',
));
$this->addColumn('Admin Number', array(
'header' => Mage::helper('customer')->__('Admin Number'),
'width' => '100',
'index' => 'entity_id',
));