cancel
Showing results for 
Search instead for 
Did you mean: 

getCollection - add Custom Filter

SOLVED

getCollection - add Custom Filter

Hi,


I need on backend, to add a custom filter on manage customers. The customers registered on frontend have a custom field called 'seller_code' on account information,
i need to filter by that field.

The code from backend that fill up the grid is:
 
<?php foreach ($this->getCollection() as $_index=>$_item): ?>
 ...

Can I add this custom field to getCollection like a filter?

2 REPLIES

Re: getCollection - add Custom Filter

Hi Alex.

 

This is not the way to do it.

It can be achieved by in a none intrusive way using observers. Rather than me repeat the contents of a good article on this, you are better off reading it yourself.

 

http://www.atwix.com/magento/add-column-to-customers-grid-alternative-way/

 

Regards,

Andy

Problem solved? Click Accept as Solution!
www.iwebsolutions.co.uk | Magento Small Business Partner

Re: getCollection - add Custom Filter

Hi @Alex Stefan,

 

This can help you: http://stackoverflow.com/questions/6046836/magento-add-column-to-customer-grid

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html