Open navigation

How do i preserve pagination and selected filters?

While navigating through search results, to preserve the page number and selected filters follow the steps below based on your store:

  • Magento 1
    1. In Magento Admin Panel, Go to System → Configuration 
    2. Go to General → Design → HTML Head → Miscellaneous Scripts
    3. Add the following script.
      <script type="text/javascript">
       var klevu_addPageNumberToUrl = true, 
           klevu_addSelectedFiltersToUrl = true;
      </script>
    4. Please clear Magento cache.
  • Magento 2
    1. In Magento Admin Panel, Go to Content → Configuration 
    2. Edit the theme from the list which is enabled for the frontend.
    3. Go to  Footer → Miscellaneous HTML and paste the code
    4. Add the following script.
      <script type="text/javascript">
             var klevu_addPageNumberToUrl = true,
                 klevu_addSelectedFiltersToUrl = true;
      </script>
    5. Please clear Magento cache.
  • Custom stores ( Non-Magento) 
    1. Add the following script on your page.
      <script type="text/javascript">
           var klevu_addPageNumberToUrl = true, 
               klevu_addSelectedFiltersToUrl = true;
      </script>
  • Shopify 
    1. Add the following script in theme.liquid file before closing the body tag.
      <script type="text/javascript">
           var klevu_addPageNumberToUrl = true, 
               klevu_addSelectedFiltersToUrl = true;
      </script>

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.