Sunday, October 20, 2013

Display products from the category on the home page in magento

  1. Open Magento admin panel and go to Catalog > Manage Categories.

  2. Select the necessary category and look for the category ID at the top.

magento-image-from-category-home-2


 


Remember the category ID value as you’ll need it later.


 


Create products block


  1. In Magento admin panel go to CMS> Pages>Home page

  2. Switch to the Content tab and into the html code block paste the following code:

magento-image-from-category-home-1


 


 




{{block type="catalog/product_list" category_id="7" template="catalog/product/list.phtml"}}

 




Make sure the category_id=”7″ value matches your category ID. When you are done click the Save button at the top.


In case you want to control the number of columns in product listing please use the following code:


 




{{block type="catalog/product_list" column_count="4" category_id="7" template="catalog/product/list.phtml"}}



Where the column_count value is the number of columns


Make sure you cleared Magento cache. Otherwise your changes may not affect your store frontend.


Display products from the category on the home page in magento

No comments:

Post a Comment