magento - Collection not supported in Layer.php -


i have written magento query,

 $productcollection = mage::getresourcemodel('reports/product_collection')         ->addcategoryfilter($category)         ->addorderedqty($from, $to)         ->addattributetoselect('*')         ->setstoreid($storeid)         ->addstorefilter($storeid)         ->setorder('ordered_qty', 'desc');         $productcollection->getselect()->limit( $limit ); 

this works , gives me required result, when used in catalog/model/layer.php, i'm getting error. think supports mage::getmodel('catalog/product')

how rewrite query , make work in layer.php. great.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -