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