If you’re having a problem in Magento with the “Show All” selection in the show products drop down menu running into timeouts or slowing down your Magento site, and you want to know how to remove the “Show All” option from the show products drop down menu, this is the solution we found.
Go to your web server and navigate to this file:
/app/code/core/Mage/Catalog/Block/Product/List/toolbar.php
Find the line that reads this or something close:
return ($perPageValues + array(’all’=>$this->__(’All’)));
Change that line of code to this:
return ($perPageValues);
Save the file.
Go to Magento admin and refresh your cache.
You should be all set. This should take care of any problems the “Show All” choice in your Magento shop may be causing.
By the way, if you’re concerned about an upgrade overwriting your changes, make a copy of the toolbar.php file and place it in the app\code\local\Mage\Catalog\Block\Product\List directory. Personally, I’m not sure I would ever do an upgrade in Magento to a live, production ecommerce site. Seems like history shows that might be a hazardous decision given Magento Commerce’s tendency to change things!
