更改Magento的默认产品限制和“新产品".模块 [英] Changing the default product limit for Magento's "New Products" module
问题描述
据我了解,默认情况下,Magento的新产品"模块(new.phtml)显示列出的最后8个产品.
As I understand, by default, Magento's "New Products" module (new.phtml) display the last 8 products listed. How is it possible to change the default and possibly even remove the limit altogether (yes, that would totally change the behavior of the "New Products" module, I understand)?
谢谢!
推荐答案
新产品块"( Mage_Catalog_Block_Product_New
)具有 setProductsCount($ count)
方法.您可以设置所需的号码.
the "New Products block" (Mage_Catalog_Block_Product_New
) has the setProductsCount($count)
method. You can set the number you want.
如果通过布局添加此块,则可以这样设置$ count
If you add this block via layout, you can set $count like this
<block type="catalog/product_new" .....>
...
<action method="setProductsCount"><count>100</count></action>
...
</block>
该数字将在 _getProductCollection()
函数中用作"PageSize过滤器".
This number will be used as a "PageSize filter" in the _getProductCollection()
function.
这篇关于更改Magento的默认产品限制和“新产品".模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!