Magento - How to display ALL PRODUCTS in the homepage?
Asked Answered
D

5

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!

Dizon answered 23/11, 2010 at 6:36 Comment(0)
P
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"}}
Prospective answered 23/11, 2010 at 11:52 Comment(6)
tried this and it says "there are no products matching the selection".. I'm using Mage 1.4.0.1Dizon
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.Prospective
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!Dizon
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.Lasala
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..Harvestman
I also had to allow the block on System/Permissions/Blocks.Dereism
N
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

Northcliffe answered 15/7, 2014 at 23:21 Comment(0)
C
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"}}
Calorimeter answered 6/1, 2014 at 11:29 Comment(2)
How can you display it following format Category A Category B Category C ---------- ----------- ---------- Product A Product B Product CConley
Fatal error: Call to a member function count() on a non-objectMantooth
C
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"}}
Chapfallen answered 14/5, 2015 at 6:40 Comment(0)
K
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

Kerril answered 16/2, 2017 at 18:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.