Я пытаюсь добавить select в моем столбце «Sources», чтобы разрешить фильтр, весь этот код работает хорошо, но я пытаюсь добавить фильтр без какого-либо успеха, кто-нибудь может указать мне правильное направление?
Пока не знаю, у меня есть:
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('source', 'customer/source', 'default_billing', null, 'left')
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');
$this->setCollection($collection);
return parent::_prepareCollection();
}
и
$this->addColumn('source', array(
'header' => Mage::helper('customer')->__('Source'),
'type' => 'source',
'index' => 'source'
));
Любая помощь будет очень признательна, спасибо