top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to fetch 5 bestsellers products programmatically in Magento?

+4 votes
162 views
How to fetch 5 bestsellers products programmatically in Magento?
posted Dec 23, 2015 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes
 
Best answer
Mage::getResourceModel(‘reports/product_collection’)
->addOrderedQty()
->addAttributeToSelect(‘*’)
->setPage(1, 5)
->load();
answer Dec 24, 2015 by Manikandan J
0 votes

Here is the way to go.......

[php]
    Mage::getResourceModel('reports/product_collection')    
    ->addOrderedQty()
    ->setPage(1, 5)
    ->load();
[/php]
answer Sep 7, 2016 by Magento_ocodewire
...