Home » Magento3 October 2011

Magento: Get Best Selling products by category and date time

This article will show you how to get best selling products. You will see how to get overall best selling products as well as best selling products by category and by date time range.

Here is the code:-

Get overall Bestselling products

Get Bestselling products for current category

Get Bestselling products for last 30 days

Note: For Magento version 1.5 and higher, you can also look into the following files to get bestselling products:

– app/code/core/Mage/Sales/Model/Mysql4/Report/Bestsellers.php
– app/code/core/Mage/Sales/Model/Mysql4/Report/Bestsellers/Collection.php

Hope this helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Ts2701

     when we add -> ->addCategoryFilter( $catId )

    we have this error

    Call to a member function getId() on a non-object in appcodecoreMageCatalogModelResourceEavMysql4ProductCollection.php on line 556

    magento 1.5

    any ideas?

  • I need to display the magento toolbar with the collection of best sellers Can you help me with this?

  • asdasd

    how i get all products sold in a specific category

  • Anna Victoria

    Thanks for sharing. Your information is really helpful to me.