We recently posted a guide on how to upgrade to Magento 1.4 which solves the most common issues people are having. But there’s another common problem that is not covered in that post: the pagination is not present on the toolbar of the search results page. Here’s how to solve the problem:
1. Open up catalogsearch.xml located under app/design/frontend/default/yourthemename/layout/ and find the code below under <catalogsearch_result_index>:
<reference name="content">
<block type="catalogsearch/result" name="search.result" template="catalogsearch/result.phtml">
<block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
<action method="setColumnCount"><count>4</count></action>
</block>
<action method="setListOrders"/>
<action method="setListModes"/>
<action method="setListCollection"/>
</block>
</reference>
2. Then just above <action method="setColumnCount"><count>4</count></action> paste this code:
<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"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
3. Then go down to <catalogsearch_advanced_result> and paste the same code above the column count.
4. Of course don’t forget to refresh Magento cache.
Any questions feel free to post them in the comments below!
Don’t forget! Subscribe and follow
Be sure to subscribe to the feed and follow us on Twitter for more tips, resources, and giveaways!
10 Comments
Magento Expert
May 20, 2010 at 2:21 pmWorks perfect! Thanks!
Arif
June 20, 2010 at 3:57 amgo to /app/design/frontend/default/THEME/layout/catalogssearch.xml
under
find
replace
product_list_toolbar
do the same for
Nicolas
August 11, 2010 at 1:52 pmThanks, works great !
darsh
October 16, 2010 at 12:43 pmI got the toolbar working but there are nu page numbers appearing ?
Dominik Fischer
November 12, 2010 at 9:19 amGreat work! Thanks for the help.
Chuck L
December 29, 2010 at 8:40 amI tried this fix and it didn’t have any effect on version 1.4.2.
Alan
February 7, 2011 at 3:06 amhello, i’ve got the same problem and magento forum can’t help me. i got a problem with pagination on my website. when i click page 2 or next page i have got error: Minimum Search query length is X (where X is number which I put in configuration). I was trying to use your solution but first I have no line like 4 and when I was trying to play with it, I didn’t do anything. I would like to ask if I would send you catalogsearch.xml file, can you look for it? I can pay for your assistance. thank you in advance.
error can be visible at: http://artliberation.org/vec888/index.php/catalogsearch/result/?q=noise when you click next page in results there will be described problem.
Dushyant Joshi
February 25, 2011 at 12:20 amThis helped me a lot. Thanks very much
Koen
April 12, 2011 at 3:36 pmHello,
I did the exact same thing with my catalogsearch.xml but it didn’t work. I also tried other stuff. What could be the problem? should I also edit the code in the default theme? I hope you can help me.
Lee
October 17, 2012 at 4:30 pmThanks helped solve my issue.
How can i fix it on the general category pages?