As of December 31, 2023, Shopify no longer allows apps to modify theme code.
To integrate Autocomplete and InstantSearch, use the Algolia AI Search & Discovery app’s App Embed and App Blocks.
To get started, see Quickstart and Algolia configuration.
refinementList
widget is used to lets users refine the search results by facets that are configured as conjunctive or disjunctive facet types
within the Shopify search configuration.
By default, the refinementList
widget shows 10 items and hides the rest.
While you can change the total number of items shown in a list with the beforeInstantSearchFacetLimitNumber
hook, this updates all refinementList
widgets which could still end up having some values hidden.
In this scenario, it’s best to show a smaller number of items and to have a Show more button to view the rest of the items.
You can achieve this with the beforeInstantSearchOptions
hook.
Example
This example updates the configuration of allrefinementList
widgets to show only 5 facets, and to display a Show more button for revealing the rest of the facets.
JavaScript