Change the default product limit for New Products Magento module
As I understand it, by default Magento module "New Products" (new.phtml) displays the last 8 products listed. How can you change the default and possibly remove the limit altogether (yes, that would completely change the behavior of the New Products module, I understand)?
Thank!
the "New Products" block ( Mage_Catalog_Block_Product_New
) has a method setProductsCount($count)
. You can set the number you want.
If you add this block using layout you can set $ count value like this
<block type="catalog/product_new" .....>
...
<action method="setProductsCount"><count>100</count></action></code>
...
</block>
This number will be used as the "PageSize Filter" in the function _getProductCollection()
.
One solution could be to add a dashboard and limit the limit on the Pager as mentioned here , or use setProductsCount ($ count) for a collection of products
The second could be overriding the class Mage_Catalog_Block_Product_New
and removing ->setPageSize($this->getProductsCount()) ->setCurPage(1)
from_getProductCollection()