B-219 Sec-55 Noida, India
+918010221733

Get Top 10 Products in Magento

$collection= Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->setStoreId($storeId)
->addStoreFilter($storeId)

->setOrder(‘ordered_qty’, ’desc’)
->setPageSize(10) ;
foreach($collection as $product)
{
$name=$product->getName();
$productId=$product->getId();
$price=$product->getPrice();
}
(Visited 50 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.