I have added a custom category list mode. Everything seems to be working fine (limit settings are the same as any other category list mode) but for some reason when I change from Grid or List mode to Slider (my new mode) the default category per page is set to 5,000.
When I comment the line in the following code (app\code\local\Mage\Catalog\Block\Product\List\Toolbar.php) the limit is set to the new mode's default of 12 and functions exactly as expect. If I print_r($this->_availableLimit[$mode] it returns array(5000=>5000).
protected function _getAvailableLimit($mode)
{
if (isset($this->_availableLimit[$mode])) {
//return $this->_availableLimit[$mode];
}
$perPageConfigKey = 'catalog/frontend/' . $mode . '_per_page_values';
$perPageValues = (string)Mage::getStoreConfig($perPageConfigKey);
$perPageValues = explode(',', $perPageValues);
$perPageValues = array_combine($perPageValues, $perPageValues);
if (Mage::getStoreConfigFlag('catalog/frontend/list_allow_all')) {
return ($perPageValues + array('all'=>$this->__('All')));
} else {
return $perPageValues;
}
}