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

查看:125
本文介绍了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天全站免登陆