This snippet is useful if you want to know which products are the bestsellers, this can be used on custom reports, lists, etc.
$catId= 2; //Change this to your Category ID
//Lets load up that category
$category = Mage::getModel('catalog/category')->load($catId);
$products = Mage::getResourceModel('reports/product_collection')
->addOrderedQty()
->addAttributeToSelect('*')
->setOrder('ordered_qty', 'desc')
->addCategoryFilter($category);

Comments (0)