11

Display all products in the homepage? Anyone who have had done this?

Note: This can be done in the CMS pages by adding manually each and every category id.. I don't want to do that.. Too much hassle if I have hundreds of categories..

I think this can be coded but I don't know where to start? Thanks and more power!

Christian Young
  • 543
  • 3
  • 8
  • 19

5 Answers5

20

Go to the homepage in the CMS -> Manage pages and add the following code snippet into the WYSIWYG

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

This should then list all of the products in your shop on that page.

You could also use the same code to drill down into a specific category, by adding the category variable, e.g.

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="9" template="catalog/product/list.phtml"}}
Raptor
  • 53,206
  • 45
  • 230
  • 366
Petet
  • 466
  • 5
  • 11
  • 2
    tried this and it says "there are no products matching the selection".. I'm using Mage 1.4.0.1 – Christian Young Nov 24 '10 at 03:12
  • 2
    Have you got any products in the Root Catalog of the shop? They need to be in there to display products on the home page. – Petet Nov 24 '10 at 11:16
  • Follow-up question: Its working now but the problem now is when a customer click on the product displayed on the homepage it won't display the correct category it should belong to, and the breadcrumb also won't point to the correct category... How will I do it that it would correctly link to the product on the "correct category"? thanks! – Christian Young Dec 02 '10 at 03:11
  • how would you do this for multiple categories, meaning if I wanted to included products from multiple categories on the homepage how would I specify that? I tried category_id="2,3,4" but that only showed products from category 2. – Crazy Serb Nov 04 '13 at 04:24
  • Its working fine, but there is slight design issue bullet points are getting displayed for the products. Can someone help me out..? Thanks in advance.. – Vinit Kadkol Apr 22 '14 at 04:50
  • 1
    I also had to allow the block on System/Permissions/Blocks. – territorial Mar 28 '17 at 14:52
10

This is the code for all products

{{widget type="catalog/product_widget_new" display_type="all_products" products_count="10" template="catalog/product/widget/new/content/new_grid.phtml"}}

Put it under >

Go to CMS > Manage pages > Edit 'Home page'

Navigate to content TAB > Click on Show Hide Editor

Put this above script

Or

Recently Viewd Products

{{widget type="reports/product_widget_viewed" page_size="5" template="reports/widget/viewed/content/viewed_grid.phtml"}}

Recently Compared Products

{{widget type="reports/product_widget_compared" page_size="5" template="reports/widget/compared/content/compared_grid.phtml"}}

Orders and returns

{{widget type="sales/widget_guest_form" template="sales/widget/guest/form.phtml"}}

Must be working for you tested till Magento 1.9

Sashi
  • 686
  • 8
  • 21
3

Go to the homepage in the CMS -> pages and select Your Home page, and in content box paste this code:

{{block type="catalog/product_new" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
SilverlightFox
  • 32,436
  • 11
  • 76
  • 145
1

Step 1: Go to: Magento Admin CMS > Pages > Home Page

Step 2: Go to: Content Tab from left

Step 3: Add following snippet in the WYSIWYG

Note : Tick the root category when create a product on the assign categories tab.

{{block type="catalog/product_list" name="home.catalog.product.list"
alias="products_homepage" template="catalog/product/list.phtml"}}
Ravi Patel
  • 641
  • 1
  • 10
  • 18
0

I succeeded to display all products on my Magento home page using the following reference: https://magentoexplorer.com/how-to-add-and-display-all-products-on-homepage-in-magento

enter image description here To display all products on Magento homepage

In Magento backend, go to CMS -> Manage pages > Homepage and add this code

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

To Display products from a specific category to homepage

Go to CMS -> Pages > Homepage and add the follow code to HTML editor of Homepage

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

Replace category_id="3" with your desired category ID

Hope this helps

Hung Tran
  • 131
  • 2