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

How do I change the default “Show _ Per Page” value of the pagination toolbar? 
 
maooley
Jr. Member
 
Total Posts:  29
Joined:  2009-10-06
 

Hello,

I have made a skin in magento which displays my grid view of products in rows of four. My default “Show _ Per Page” settings are 9, 15, 30 and “all”.

I want to change this to 12, 24, 36 and all.

Any clue as to how to do this? Any help would be greatly appreciated.

I have looked in toolbar.php, and I can’t seem to figure it out. Toolbar.php seems to reference a file called “catalog/frontend/list_per_page_value” but I can’t seem to find it. Is that what I need to be looking for?

Thanks in advance.

-Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
vbwebsites
Sr. Member
 
Avatar
Total Posts:  93
Joined:  2009-01-12
Virginia
 

System > Configuration > Catalog > Then “Frontend”

 
Magento Community Magento Community
Magento Community
Magento Community
 
Fastmover
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2009-10-22
Kansas City, Mo
 

So how do you get rid of ALL?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kiatng
Enthusiast
 
Total Posts:  875
Joined:  2008-09-03
Kuala Lumpur, Malaysia
 

One way to get rid of ALL, is to modify a core file:

app\code\core\Mage\Catalog\Block\Product\List\Toolbar.php
look for lines 539 and 548:

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

and change that to

return ($perPageValues);
 
Magento Community Magento Community
Magento Community
Magento Community
 
kiatng
Enthusiast
 
Total Posts:  875
Joined:  2008-09-03
Kuala Lumpur, Malaysia
 

Another way without changing core file.  You can this file

app\design\frontend\default\default\template\catalog\product\list\toolbar,phtml
look for lines66 to 70

<?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
         
<option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
                
<?php echo $_limit ?>
          
</option>
 
<?php endforeach; ?>

change that to

<?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
           <?php 
if ($_key != 'all') : ?>
                    
<option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
                        
<?php echo $_limit ?>
                    
</option>
           
<?php endif ?>
 <?php 
endforeach; ?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Jackle99
Jr. Member
 
Total Posts:  1
Joined:  2012-11-05
 
vbwebsites - 16 October 2009 06:45 AM

System > Configuration > Catalog > Then “Frontend”

Maybe you had an older version of Magento, I am working with 1.7.0.2.

You dont have to change any code to get the result you want, follow what vbwebsites said and you can change the numbers to whatever you like and also turn off “ALL” so it isn’t displayed.

I changed mine from the normal 9 per page because I have 4 columns so changed mine to 12,16 and ALL then changed the default to 12.

Alex.

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