Removing All from Show All Per Page on Magento’s front end

.

Searching low and high, trying every search string i can think of in google. I’ve found nothing. Posting on Magento Commerce’s website i got a response with the answer. Here is the answer:

The file you are looking for is: Mage/Catalog/Block/Product/List/Toolbar.php

In this file at line 530 function getAvailableLimit()

public function getAvailableLimit()
{
if ($this->getCurrentMode() == 'list') {
if (isset($this->_availableLimit['list'])) {
return $this->_availableLimit['list'];
}
$perPageValues = (string)Mage::getStoreConfig('catalog/frontend/list_per_page_values');
$perPageValues = explode(',', $perPageValues);
$perPageValues = array_combine($perPageValues, $perPageValues);
return ($perPageValues /*+ array('all'=>$this->__('All'))*/);
}
elseif ($this->getCurrentMode() == 'grid') {
if (isset($this->_availableLimit['grid'])) {
return $this->_availableLimit['grid'];
}
$perPageValues = (string)Mage::getStoreConfig('catalog/frontend/grid_per_page_values');
$perPageValues = explode(',', $perPageValues);
$perPageValues = array_combine($perPageValues, $perPageValues);
return ($perPageValues /*+ array('all'=>$this->__('All'))*/);
}
return parent::getAvailableLimit();
}

as you can see the

return ($perPageValues /*+ array('all'=>$this->__('All'))*/);

I comment /*+ array(’all’=>$this->__(’All’))*/
now the “All” show anymore ….

Or course you should not change the core but sometime it’s easier then build an override
for it.

You should test it on a development store before !!!!
USE AT YOUR OWN RISK !!!!

Let me know if you have any problem

Leave a Reply