Hi Everybody, I've added some new columns attributes successfully to my customer entity, I can display them on frontend and backend customer page too. I'm struggling now with displaying the data in the customer grid so I can export these data too.
The one I can't include are actual multiselect values I'm using the following code while extending
Mage_Adminhtml_Block_Customer_Grid
in the method _preparecollection I've done this:
protected function _prepareCollection()
{
$collection = Mage::getResourceModel('customer/customer_collection')
->addNameToSelect()
->addAttributeToSelect('email')
->addAttributeToSelect('gender_sb')
->addAttributeToSelect('customer_category')
->addAttributeToSelect('occasional_gift')
->addAttributeToSelect('personalisation')
->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');
return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
}
I can succesfully display the gender which is a dropdown value but not customer_category, occasional_gift and personalisation which are a multiselect attribute kind.
Do you have any advice on this matter.
Thanks.