1

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;
    }
}
tylersDisplayName
  • 1,590
  • 1
  • 18
  • 46

1 Answers1

1

I won't even ask why you would want to display more than 5000 products but limits can be set in the layout XML (check catalog.xml or local.xml) or the System Configuration (system > configuration > catalog > frontend tab).

Another option could simple be a limitation in MySQL or the memory. Haven't tested this but wouldn't be surprised either one of those runs into a limitation

Sander Mangel
  • 37,528
  • 5
  • 80
  • 148