我试图将我的主页上某个类别的产品数量限制为4个。限制在主页上显示的产品数量,list.phtml
我试图用这样做的代码是:
{{block type="catalog/product_list" column_count="4" category_id="13" template="catalog/product/list.phtml"}}
这里有一些我已经试过的东西:
num_products="4"
limit = 4, limit="4"
count = 4, count="4"
_productCollection="4"
_productsCount="4"
我已经list.phtml的思想有一个副本可能是在那里改变它的一种方式,但无法找到一种方法。
最顶上PF list.phtml是这样的代码:
<?php
$_productCollection=$this->getLoadedProductCollection();
$_helper = $this->helper('catalog/output');
?>
而且在网格视图中有这样的:
<?php $_collectionSize = $_productCollection->count() ?>
<?php $_columnCount = $this->getColumnCount(); ?>
<?php $i=0; foreach ($_productCollection as $_product): ?>
<?php if ($i++%$_columnCount==0): ?>
任何想法上无论是在块内或限制的产品模板文件?
limit =“4”在Magento 1.9中不起作用 – 2015-09-14 12:09:56