$curr_categoryid = Mage::registry('current_category')->getId(); $cat_Id= $curr_categoryid; $category = Mage::getModel('catalog/category')->load($cat_Id); $products = Mage::getResourceModel('reports/product_collection') ->addOrderedQty() ->addAttributeToSelect('*') ->setOrder('ordered_qty', 'desc') ->addCategoryFilter($category);
No comments:
Post a Comment