如何将Magento limit the number of products shown with in the new products block中提供的解决方案应用于主页上显示的随机产品块中?Magento中的随机产品块中显示的产品数量限制
我目前拥有的代码
<reference name="random">
<block type="catalog/product_list_random" name="product_random" template="catalog/product/grid_only.phtml">
<action method="setProductsCount"><count>3</count></action>
</block>
</reference>
在我的布局更新XML。网格产品视图的默认值似乎主导了在后端系统>配置>目录>目录>前端>“每页上网格产品缺省值”中设置的该值。
两者
我建议你不要使用内置的块随机产品在所有的,因为它是非常unperformant 。请阅读有关替代方法:http://www.schmengler-se.de/en/2015/09/show-random-products-in-magento-you-are-doing-it-wrong/ – 2015-09-29 14:10:30