I’m trying to add select in my column “Sources” to allow filter, all this code works well, but I’m trying to add filter without any success, anyone can point me in the right direction?
Until know I have:
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();
}
and
$this->addColumn('source', array(
'header' => Mage::helper('customer')->__('Source'),
'type' => 'source',
'index' => 'source'
));
Any help will be very apreciated
thanks
1 Answer