magento - Apply filter on collection Object -


i getting object on list page

$_productcollection=$this->getloadedproductcollection();  //return 3 records 

now applied filter as

$_productcollection=$_productcollection->addfieldtofilter('genre', array('finset' => '126'));  //now should return 1 record 

but gives me count of 3. now, if run query in database getting query using echo $_productcollection->getselect(); returns 1 record.

can me resolve this?

most doesn't work because $this->getloadedproductcollection() returns collection already has been loaded catalog/layer singleton.

but override mage_catalog_model_layer::prepareproductcollection() in control , add custom filters want.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -