Magento: Display New Products On Home Page – By Category!

Example of Magento template displaying new products on the home page - by category! Since I posted the code to add new products on your Magento home page, we got a bunch of requests on how to display new products per category, instead of globally.

If you only want to display new products from a specific category – it’s easy. All you have to do is make sure that in your catalog, you’ve set products “as new” only to products that belong to that category.

If you want to display new products on the home page, but want them organized  by category – we have a very easy way to achieve this  very quickly! Simply add this code in your CMS page:

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

Where “featured.phtml” is a copy of the default new.phtml that you can style and format anyway you’d like. In the case above, we’re displaying products from the category id number 2. Repeat the code above to display products from any other categories from your store.

Important note! Now the products that show up first in your category, will be displayed on the home page. To control which products show up first, simply go to Catalog -> Manage Categories and click on the category you’d like to edit. Then click on “Category Products” and set the position for your products. That’s it!

This great Magento template for digital products uses this very method to display new products by categories on the home page.

Questions? Feel free to ask in the comments below.

Note: tested on Magento 1.3.2.4 only.

18 Comments

  • mar
    does not work for me.

    Noam -

    What problem are you having?
  • Christopher
    Where do I put the code. In the text area or the design code area? I know that sounds stupid but I tried both and nothing.

    Noam -

    The code goes in the “content” area. Did you make sure to duplicate the file “new.phtml” and name the new file “featured.phtml”?
  • seville
    Hey Noam great tutorials!

    But I tried it out and unfortunately it is not displaying anything. I also tried out to display all new products with the code in your other post you mentioned here and that worked fine. I also copied the new.phtml and renamed it to featured.phtml and select a category which has the new products. But no avail. :(

    when I change it to block type=”catalog/product_new instead of _list it shows all new products, do I have to create a block type or something?

    I appreciate any help!

    Using Magento 1.4.0.1

  • Riccardo
    Hi i tried to do that but it doesnt work for me. My version is 1.4.1.0 and template is modern.

    Hope some one can help me.

  • justzentai
    Thank you very much. I have a question. I can display a certain category products at homepage, but I can’t control its count. For example, I want to display only 4 products of one category. How can I do it?
  • Matthew
    If you believe you have everything correct, but products are still not showing up using the code above, try removing the “name” attribute, like this:

    {{block type=”catalog/product_list” category_id=”2″ alias=”product_homepage” template=”catalog/product/featured.phtml”}}

  • Paul
    Doesn’t work for me. It only shows the date added as the newest products not the settings in admin.

    Is there a way of listing the newest products based on the settings in

    admin/catalog/manage products/

    Set Product as New from Date + Set Product as New to Date.

  • Niyi
    Thanks for this. But I am curious. What code can I use if I want to put the code under the layout xml instead of the content section.
    Thanks
  • Niyi
    I finally got the code, however, after creating the different codes to fetch different categories, it fails to work. The same product are showing in all the different categories. What can I do?
  • satya veni
    I tried all the solutions mentioned above. But still the products are not displayed at home page.
    {{block type=”catalog/product_list” category_id=”3″ alias=”product_homepage” template=”catalog/product/featured.phtml”}}

    the above code was copied to content text area and clicked on save.

    It was not working for me. Please help out to solve this.

  • Anna
    Thank you for this!
  • Karen
    Not working for me either. I am using Magento 1.5 – please offer a solution.
  • Robert
    Not working here either. How do I verify that I have a “new.phtml” file? where is is supposed to be located? I have about 20 different places where “catalog/product/” shows up… how do I know which directory tree to be in?
  • Power Balance
    where to download catalog/product/featured.phtml page ? thank you
  • tuba
    Nice trick man, thanks!
  • professionele webshop
    Thanks for this little help!

Leave a Reply

Sorry - this blog is now closed to new comments.