How to allow all products on Magento
Sometimes your Magento installation needs to default to allow all products instead of paginated products. Magento does not allow for this automatically as it only allows a number already listed in the pagination options to be entered for the default. There is a quick fix for this by creating a local file to override the core file in making this happen.
- Copy app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php to app/code/local/Mage/Catalog/Block/Product/List/Toolbar.php.
- Edit the new toolbar.php file in the function referenced around line 723 by
- Replace the following line in the else side of the if else statement:
$limit = Mage::getSingleton('catalog/session')->getLimitPage();
$limit = 'all';
- Save the new file to the local path you just created
That should make it all default to all products shown. Be careful of using this in large stores to have ridiculous page load times, but in smaller product lines this will work just fine! If you need help making your magento installation faster check here.
We thought you might like to see these other posts about ecommerce...
Kim Young is Founder, CEO, and a developer at Foo - a web development company based in Wesley Chapel, Florida. She can also be found on Google+. With over 16 years of experience as a web developer, Kim is excited to share with you tidbits that she has picked up along the way. Kim prioritizes continuing education and out of box thinking in order to bring the most valuable solution to Fooweb's clients.