Get a categories products ordered by number of sales

[php] load($categoryId); $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 *

*