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
Post a Comment