Magento "Products per Page on Grid Allowed Values" Configuration Not Working + Solution
Sep 1, 2011 · 1 minute readCategory: magento
If you are getting a little bit frustrated trying to figure out why the admin configuration for the number of products to display on a page and the options in the products per page drop down are not working then this is quite possibly your soluiton.
The template file in question is in catalog/product/list/toolbar.phtml
You will see it refererences the block Mage_Catalog_Block_Product_List_Toolbar
So far so good, it all looks like it should be working but it just isn’t.
The issue can be that in your theme’s layout XML file, some values are being set for this with some XML that looks like this:
<action method="setDefaultListPerPage"><limit>10</limit></action>
<action method="setDefaultGridPerPage"><limit>8</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>10</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>20</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>30</limit></action>
If that XML is there, then these actions are being called against your block object with these parameters, effectively overwriting your admin values.
To get the admin values to be respected, you need to comment out or totally remove this XML from your layout, clear your cache and you are in business.