For filters that contain so many values that it has become quite a chore to look through them all when filtering, you might want to have a dedicated search box to find things quickly. This feature can be enabled and configured per specific filter at Tweakwise App > Filtertemplates.
Read our product guide on how to configure the Search within filters in detail.
Once this setting is enabled, our Frontend API response will contain extra fields for those specific filters with information on whether this setting is enabled, an optional placeholder text and an 'empty results' text. This information is needed to do a proper implementation in you platforms storefront.
<navigation>
<facets>
<facet>
<facetsettings>
...
<issearchable>true/false boolean to indicate if search is available within the facet</issearchable>
<searchplaceholder>Placeholder text for the facet search</searchplaceholder>
<searchnoresultstext>Text for when there are no results for the facet search</searchnoresultstext>
</facetsettings>
...
</facet>
</facets>
...
</navigation>
{
"navigation": {
"facets": [
{
"facetsettings": {
"issearchable": true, // boolean to indicate if search is available within the facet
"searchplaceholder": "Placeholder text for the facet search",
"searchnoresultstext": "Text for when there are no results for the facet search"
}
}
]
}
}
This information will be provided in the following endpoints of our Frontend API
- Facets >
facets
- Navigation >
navigation
- Navigation >
grouped navigation
- Navigation search >
search
- Navigation search >
grouped search
The issearchable
field marks an indicator that this feature is enabled for the specific filter. You should use this setting to determine whether to show or not to show the functional behavior in your frontend.
If set to true, we expect you to show a search box within your specific filter and develop the actual behavior yourself. No extra API request should be made for this search, as all information (filter values) is available in the given API response already. The actual search behavior should be executed client-side.