I have to change the results per page option on my products page. The results per page drop down must show 3,12,21 and right now it's 12,24,36. I have to change it using only the local.xml file. I'm using magento 1.9.
-
Cannot you change from admin area? Any reason for changing it from local.xml?– Adarsh KhatriCommented Dec 12, 2016 at 0:15
-
yes i could but I was assigned to do it from the local.xml because I'm doing an internship and they told me to do it that way so I would learn the "proper way". Just a weird request from them..– RufasCommented Dec 12, 2016 at 0:26
-
Well I changed it from the admin area, I'll ask them tomorrow how I was supposed to do it. Thanks for the help anyway!– RufasCommented Dec 12, 2016 at 0:29
-
Check this: magento.stackexchange.com/questions/34451/… too.,– Adarsh KhatriCommented Dec 12, 2016 at 0:34
Add a comment
|
1 Answer
you can try this code may it works
<reference name="product_list_toolbar">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
<action method="setDefaultListPerPage"><limit>4</limit></action>
<action method="setDefaultGridPerPage"><limit>9</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>3</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>9</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>12</limit></action>
<action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
</block>
</reference>
Add above code in category handler those are
<catalog_category_default>
and
<catalog_category_layered>