Thursday 10 May 2012

Add Featured Products to Home Page in Magento


This article will show you an easy way to display products of your choosing on the home page.

1. Create a category to contain the featured products. Call it e.g. “Featured” or “Home Page”. Set “Is Active” to No. That way, it won’t display in the catalog menu.
2. After saving the category, please note what ID it gets. You can see it in the last part of the URL. If the URL ends with catalog_category/edit/id/8/, the ID is 8.
3. Add products for the home page to the new category.
4. Edit the Home Page (CMS → Manage Pages → Home Page) and add the following content, where 8 should be replaced by your category ID:

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

If you want a view that is different from the category lists, you can copy and modify list.phtml and change the path above.

Please note: In order to make this work for more than one block of products with different category IDs on the same page, you need to add the following code at the end of your phtml file(s):

5 comments:

  1. I have been getting a lot of useful and informative material in your website.
    Tips by KK Select

    ReplyDelete
  2. Great piece of work. Thanks alot.

    ReplyDelete
  3. Thanks! for sharing . It really helped me a lot.

    ReplyDelete
  4. Thanks for the best blog.it was very useful for me.keep sharing such ideas in the future as well.this was actually what i was looking for,and i am glad to came here!
    magento development company in bangalore 

    ReplyDelete