Show All Category Products By Default In Magento Programatically

Thursday, 28. July 2011

In order to show all products in a category by default you can follow this approach:

1) Overwrite the Core toolbar class: Mage_Catalog_Block_Product_List_Toolbar.php

2) From the base class, copy and override the function getLimit() in your new class. (method starts around line 723)

3) In your overridden function, Look for a line:

$limit = Mage::getSingleton('catalog/session')->getLimitPage();

And replace it with

$limit = 'all';

You can now clear your Magento cache in order to register your new extension and have fun testing your view all products on a category page by default!

Leave a Reply

You must be logged in to post a comment.