Magento-如何在主页中显示所有产品?

Magento-如何在主页中显示所有产品?,magento,product,magento-1.4,Magento,Product,Magento 1.4,是否在主页中显示所有产品?有谁做过这件事 注意:这可以通过手动添加每个类别id在CMS页面中完成。。我不想那样做。。如果我有成百上千的分类,那就太麻烦了 我想这是可以编码的,但我不知道从哪里开始?谢谢,还有更多的力量 转到CMS->Manage页面中的主页,并将以下代码段添加到WYSIWYG中 {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" templat

是否在主页中显示所有产品?有谁做过这件事

注意:这可以通过手动添加每个类别id在CMS页面中完成。。我不想那样做。。如果我有成百上千的分类,那就太麻烦了


我想这是可以编码的,但我不知道从哪里开始?谢谢,还有更多的力量

转到CMS->Manage页面中的主页,并将以下代码段添加到WYSIWYG中

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
然后在该页面上列出您商店中的所有产品

您还可以使用相同的代码,通过添加category变量深入到特定类别,例如

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

转到
CMS->pages
中的主页,选择
您的主页
,然后在内容框中粘贴此代码:

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

这是所有产品的代码

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

转到CMS>管理页面>编辑“主页”

导航到“内容”选项卡>单击“显示隐藏编辑器”

把这个放在脚本上面

最近观看的产品

{{widget type="reports/product_widget_viewed" page_size="5" template="reports/widget/viewed/content/viewed_grid.phtml"}}
{{widget type="reports/product_widget_compared" page_size="5" template="reports/widget/compared/content/compared_grid.phtml"}}
{{widget type="sales/widget_guest_form" template="sales/widget/guest/form.phtml"}}
最近比较的产品

{{widget type="reports/product_widget_viewed" page_size="5" template="reports/widget/viewed/content/viewed_grid.phtml"}}
{{widget type="reports/product_widget_compared" page_size="5" template="reports/widget/compared/content/compared_grid.phtml"}}
{{widget type="sales/widget_guest_form" template="sales/widget/guest/form.phtml"}}
订单和退货

{{widget type="reports/product_widget_viewed" page_size="5" template="reports/widget/viewed/content/viewed_grid.phtml"}}
{{widget type="reports/product_widget_compared" page_size="5" template="reports/widget/compared/content/compared_grid.phtml"}}
{{widget type="sales/widget_guest_form" template="sales/widget/guest/form.phtml"}}

必须在Magento 1.9之前为您工作测试步骤1:转到:Magento管理员CMS>页面>主页

步骤2:从左侧转到:内容选项卡

步骤3:在所见即所得中添加以下代码段

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
注意:在“分配类别”选项卡上创建产品时,勾选根类别

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

我使用以下引用成功地在我的Magento主页上显示了所有产品:

在Magento主页上显示所有产品

在Magento后端,转到CMS->管理页面>主页并添加此代码

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
将特定类别的产品显示到主页

进入CMS->Pages>Homepage,将下面的代码添加到Homepage的HTML编辑器中

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="3" template="catalog/product/list.phtml"}}
用所需的类别id替换类别\u id=“3”


希望这有帮助

尝试过这个,它说“没有与选择相匹配的产品”。。我使用的是Mage 1.4.0.1商店的根目录中有产品吗?他们需要在那里在主页上显示产品。后续问题:它现在可以工作了,但现在的问题是,当客户单击主页上显示的产品时,它不会显示它应该属于的正确类别,面包屑也不会指向正确的类别。。。我将如何做才能使其正确链接到“正确类别”上的产品?谢谢对于多个类别,您将如何做到这一点,也就是说,如果我想在主页上包含多个类别的产品,我将如何指定?我尝试了类别_id=“2,3,4”但这只显示了类别2中的产品。我还必须允许系统/权限/块上的块。您如何按照以下格式显示类别A类别B类别C-------------------------产品A产品B产品C
致命错误:调用成员函数count()在非对象上