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 ACCEPTED SOLUTIONS

Accepted Solutions

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

View solution in original post

Re: getCollection - add Custom Filter

2 REPLIES 2

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

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now