Magento Display Category BestSellers

[php]
$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);[/php]

Leave a Comment

Your email address will not be published. Required fields are marked *

*