Magento PaginationWe 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!

Related Posts:

ABOUT THE AUTHOR

Next generation websites that work on all devices, feature award winning web design, state-of-the-art web technologies, and powerful administration tools to edit and manage your site anytime, anywhere! Follow us on Twitter and subscribe to the feed to stay tuned.

12 Comments

  1. Magento Expert
    May 20, 2010 at 2:21 pm

    Works perfect! Thanks!

    Reply
  2. Arif
    June 20, 2010 at 3:57 am

    go to /app/design/frontend/default/THEME/layout/catalogssearch.xml

    under
    find

    replace

    product_list_toolbar

    do the same for

    Reply
  3. Nicolas
    August 11, 2010 at 1:52 pm

    Thanks, works great !

    Reply
  4. darsh
    October 16, 2010 at 12:43 pm

    I got the toolbar working but there are nu page numbers appearing ?

    Reply
  5. Dominik Fischer
    November 12, 2010 at 9:19 am

    Great work! Thanks for the help.

    Reply
  6. Chuck L
    December 29, 2010 at 8:40 am

    I tried this fix and it didn’t have any effect on version 1.4.2.

    Reply
  7. Alan
    February 7, 2011 at 3:06 am

    hello, 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.

    Reply
  8. Dushyant Joshi
    February 25, 2011 at 12:20 am

    This helped me a lot. Thanks very much

    Reply
  9. Koen
    April 12, 2011 at 3:36 pm

    Hello,

    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.

    Reply
  10. Lee
    October 17, 2012 at 4:30 pm

    Thanks helped solve my issue.

    How can i fix it on the general category pages?

    Reply
  11. rob
    April 7, 2013 at 9:06 am

    thanks! worked good :)

    Reply
  12. shobana
    June 14, 2013 at 6:23 am

    My doubt is, how to display the respective subcategories while searching the any category in search results…? so pls reply me whats code to add, where to add ? that results has to be display in catalogsearch/result.phtml
    while searching the category i got your search results returns no result…
    can any one help me pls…

    Reply

Leave a Reply

Web Analytics