All about Magento E-commerce Store.......MagentoForum

Sunday, January 8, 2012

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.

Magento: How to setup Ogone Payment Method?

Ogone is one of the leading European Payment Service Providers with more than 28.000 clients across 40 countries.
Ogone is connected through certified links to more than 200 European banks/acquirers that enable handling of international payment methods like Visa, MasterCard, American Express, Diners Club and JCB as well as local ones like iDEAL and Machtigingen in The Netherlands, Solo and Maestro UK in United Kingdom and ELV and giropay in Germany.

Magento: Get sub categories and product count

Here, I will be showing you the code to get sub categories of a particular category and the number of products (product count) present in the sub categories.
Like, I have a category named Furniture. The sub categories under Furniture are Living Room and Bedroom. Now, I want to show the sub categories under Funiture and the products associated with the sub categories (Living Room and Bedroom).

Magento: How to get all associated children product of a configurable product?

A configurable product can have multiple other products associated to it.
Here is the code to fetch all the children products that are associated with a configurable product.
Here goes the code :)

Magento: Product Edit Warning: Invalid argument supplied for foreach()

While editing product programatically from frontend. I was trying to change the status of the product with the following code:

Magento: Reindex Data Programmatically

This article shows how to reindex Magento Data Programmatically (through code).
You can manually reindex data from System -> Index Management. However, this article is concerned how this can be done through code/programming.

Magento: How to get product rating and review?

Here is the code to get ratings and reviews for any particular product.
 * Getting reviews collection object