Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

First page of a category page with X items, next pages with Y items
 
tgoellner
Jr. Member
 
Total Posts:  13
Joined:  2008-11-23
 

Hi,

is there any way to make Magento show (for example) 5 products on the first page of a product listing and 8 on the next pages?

I started with changing some code in

app/code/Mage/Catalog/Block/Product/List/Toolbar.php:

public function getLimit()
    
{
        $limits 
$this->getAvailableLimit();
        
$limit reset($limits);

        
$limitParam $this->getRequest()->getParam($this->getLimitVarName());
            
            
        if(
$limitParam == 'all')
          
$limit 'All';
        elseif(
intval($this->getCurrentPage())>1)
          
$limit next($limits);

        return(
$limit);
    
}

And in ADMIN->CONFIGURATION->CATALOG->SHOP I defined:

List: Grid Only
Products per page on grid: 5,8
Products per page (standard): 5

What it does now is:

The first page shows items no. 1,2,3,4,5. The next page should show items no. 6,7,8,9,10,11,12,13 but instead I see items no. 9,10,11,12,13,14,15,16 - so there are 3 items missing (items no. 6,7,8).

I guess that is because Magento thinks that the first page has the same limit as the next pages so it leaves out the first 8 items on page 2 - how can I tell Magento to begin the counting 3 items earlier?

Hope you get me right…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top