User defined number of results per page

I have a Magento site using Algolia and I am looking to allow visitors to the site select the number of results they would like displayed each page of results. i.e a drop down select 10, 25, 50, 100. Is there a widget for this feature?

Hello @clueleast,

the option is not integrated directly to the Magento extension.
But there is a IS.js widget you can implement yourself - https://community.algolia.com/instantsearch.js/documentation/#hitsperpageselector

The best thing is to create a algoliaHookBeforeInstantsearchStart method in your custom JS file. To this function the instance of InstantSearch is passed, you can add the widget to it and return the instance back from the function.

Let me know how it goes.

Hi Jan,

Worked perfectly, thank you

You are more than welcome. Happy searching! :rocket:

Hi Jan,

Following on from implementing he hits per page function I now need to persist the users selection e.g.(50 results) across all searches during the user’s session. Is there anything within Algolia to help with this or do I need to persist the setting outside Algolia and apply to each instance of the results? Apologies if this is a basic question but cannot find any hints on how to achieve my objective.