Take a look on catalog.xml
file in the location app/design/frontend/base/default/layout/catalog.xml
. The handles that you need to study are catalog_category_default
and catalog_category_layered
. The following code snippet is taken from catalog_category_default
. The same portion is also awailable for the handle catalog_category_layered
.
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
<!-- The following code shows how to set your own pager increments -->
<!--
<action method="setDefaultListPerPage"><limit>4</limit></action>
<action method="setDefaultGridPerPage"><limit>9</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
<action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
-->
</block>
...
</block>
This is what our default toolbar
block definition. Now look on those actions that are commented out inside toolbar
block. The method that we interested here is addPageLimit
. This method is used to set page limit for toolbar
block. In order to test it, you need to edit your theme's catalog.xml
file. In that file, if this section exists, just add this codes there
<action method="addPagerLimit"><mode>list</mode><limit>9</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>9</limit></action>
Samething you need to do for the handle catalog_category_layered
. Then clear cache and try again.
You can also take a look on my blog which teaches how can we set page size via observer. You can get that extension through github.
Note: Make sure cache is cleared before refresh the page.
Hope it helps for you.