Magento - 如何在主页中显示所有产品? [英] Magento - How to display ALL PRODUCTS in the homepage?

查看:24
本文介绍了Magento - 如何在主页中显示所有产品?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在主页中显示所有产品?有人做过吗?

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

注意:这可以在 CMS 页面中通过手动添加每个类别 ID 来完成.. 我不想这样做.. 如果我有数百个类别太麻烦..

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!

推荐答案

在 CMS 中进入主页 -> 管理页面并将以下代码片段添加到所见即所得中

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"}}

这篇关于Magento - 如何在主页中显示所有产品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆