Search code examples
magento-1.8

Display all product in magento homepage


I have the category structure like this..

-Default Category (0)
     --Ravi varma (2)
       ---Nature (2)
       ---Religious (0)
     --Da Vinci (2)
     --Michelangelo (1)
     --Picasso(1)

Default category is the root category and all others are subcategory. Subcategory Ravi varma have again two subcategories. Now I want to display all the product in home page. For this I use the short code:

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}

But in home page nothing is displayed except the given message.

There are no products matching the selection.

For testing I add a product to the default category, then that product only displayed in home page. From this I realize that the products belonging to root category only display on home page using this short code. But I can't set all the category as root. So I want to display all the product from all category in home page. How can I do this??

I am using Magento ver. 1.8.1.0.


Solution

  • Add all product to the Default category.
    

    Since all category are under the Default category all products should belongs to the Default category.

    Then your category structure is like:

    -Default Category (8)
         --Ravi varma (2)
           ---Nature (2)
           ---Religious (0)
         --Da Vinci (2)
         --Michelangelo (1)
         --Picasso(1)