【发布时间】:2015-12-17 07:33:51
【问题描述】:
如何在首页显示所有产品详情(价格、描述、图片..),
在Cms中使用下面的编码->主页->内容,
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
它没有在前端显示任何产品?
检查 cms 主页设计,
<\!--<reference name="content">
<block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page">
<action method="addPriceBlockType">
<type>bundle</type>
<block>bundle/catalog_product_price</block>
<template>bundle/catalog/product/price.phtml</template>
</action>
</block>
<block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new">
<action method="addPriceBlockType">
<type>bundle</type>
<block>bundle/catalog_product_price</block>
<template>bundle/catalog/product/price.phtml</template>
</action>
</block>
<block type="reports/product_compared" name="home.reports.product.compared" template="reports/home_product_compared.phtml" after="product_viewed">
<action method="addPriceBlockType">
<type>bundle</type>
<block>bundle/catalog_product_price</block>
<template>bundle/catalog/product/price.phtml</template>
</action>
</block>
</reference>
<reference name="right">
<action method="unsetChild"><alias>right.reports.product.viewed</alias></action>
<action method="unsetChild"><alias>right.reports.product.compared</alias></action>
</reference>-->
它在 html 标记中的注释中编码并删除该 html 标记它会显示产品,但它会显示产品图像,如下所示,产品显示一旦用户查看它将显示的产品,为什么它显示最近用户查看的产品,我想显示所有产品。
【问题讨论】:
-
{{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-1.9