Adding Hits per page drop down

Hi
I need to add Product per page drop down for Magento 2.1 site.how it is done ? I tried the code snippets in this https://community.algolia.com/instantsearch.js/documentation/#hitsperpageselector

Hello @kalidusachinthal,

you can see here how it can be done: User defined number of results per page

I just try add the method and passed parameters.but it didn’t work as expected.but I just add the search.addWidget function after the search variable is initialized.then it works . do you think that’s ok ?

Thanks

Yes, it’s ok. You need to put it between it’s initialization and call of search.start();

yes after this actuallty
var search = algoliaBundle.instantsearch(instantsearchOptions);

thanks

1 Like