Magento: Pagination Disappears On The Search Results Page After Upgrading to 1.4

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:

9 Comments

  • Magento Expert
    Works perfect! Thanks!
  • Arif
    go to /app/design/frontend/default/THEME/layout/catalogssearch.xml

    under
    find

    replace

    product_list_toolbar

    do the same for

  • Nicolas
    Thanks, works great !
  • darsh
    I got the toolbar working but there are nu page numbers appearing ?
  • Dominik Fischer
    Great work! Thanks for the help.
  • Chuck L
    I tried this fix and it didn’t have any effect on version 1.4.2.
  • Alan
    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.

  • Dushyant Joshi
    This helped me a lot. Thanks very much
  • Koen
    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.

Leave a Reply

Sorry - this blog is now closed to new comments.