Home » Magento30 January 2011

Magento: How to get top rated products?

Here, I will be showing you how to get the top/highest rated product.

The basic idea for getting the top rated products is fetching all products, looping through them, getting ratings of each product and populating a ratings array. After that sort the array and then slice the array for limiting the number of product to display.

Here is the function to get the top rated products:-

Now, you can display the products in any template file. Here is the sample code to display the top rated products:-

Hope this helps. Thanks.

Magento

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed