Search code examples
phpmagento-1.9htmlproduct

Doesn't showing products on home page in magento 1.9


I am working with Magento CMS [version 1.9.0.1]. I need to list all products in the home page. So I added the block snippet code inside the content area. The snippet is shown below

{{block type="catalog/product_list" name=home.catalog.product.new alias="product_homepage" template="catalog/product/new_products.phtml" }}

But it never lists the product grids on home page, it only shows the title "New Products" with an underline. But in my site there is only one product. Is there any limitation to list the products in home page?


Solution

  • Yes there is the limitation because you are fetching here the new products and I think you have not set the date (Set Product as new From date) and the Set Product as new To date. Please set the date it will display the New Product listing here on the home page.

    if you want to display all the products use the below code:

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

    Want to display the product category wise use the below code:

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

    Hope it helps.