Magento ecommerce - Adding products to the homepage

Magento ecommerce – Adding products to the homepage

By Luke on September 28, 2009

Magento ecommerce logo

How do I add products to the homepage in Magento?

Since the latest version of Magento (version was released back in September, Magento is proving to be a very popular and very comprehensive ecommerce platform. There is both a free and an Enterprise version available, and already the online communities are rapidly growing in size as more and more developers try the system out, and try to work out all the functionality.

Astonishingly, one of the most popular or common questions I have seen is how to add products to the homepage of the site. This is something that Magento should perhaps have made much more obvious, as it really is a key part of the functionality! The Magento community pages offer lots of different lines of code to bring in i.e. latest products, sale items, specific categories etc. However, what most developers would like to do is have different items from multiple categories on the homepage.

To do this, we recommend creating a ‘featured’ category and adding any item you want on the homepage to this as well as the original category. Next, go to CMS > Manage Pages and click on Home. To add the featured category you have just created, add the following line of code, making sure to replace the ‘id’ with the actual id of this category.

{{block type=”catalog/product_list” category_id=”13″ template=”catalog/product/list.phtml”}}

If you are unsure how to find out the id of the category, go to Catalog > Manage Categories and then click on the Category you want from the column on the left. This will load in the details of the Category, and display the id in brackets next to the Category title.

Once you have added this line of code with the chosen id to your homepage, click Save and then refresh the homepage to see the results. Voila – your homepage will now display all the items from the chosen category!

I hope this helps. If you have any questions regarding eCommerce systems or Magento then feel free to contact us. We will be adding more blog posts in this category over the coming weeks. Enjoy!