On the website, you sometimes use a filter with many filter values. This makes it more difficult for website visitors to find and select the correct filter value. It can then be helpful to add the ability to search within a filter through the filter values. For example, as shown in the image below.
In this article, we will explain how you can set this up.
To do this, go to the Tweakwise module Filtering -> Filtertemplates -> Open the filter for which you want to use this function. There you will find the option 'Search in filters'.
Check this setting and fill in a placeholder text, which is the text shown in the search bar. Additionally, fill in the text for no results. This is the text shown when no result is found.
After enabling this setting "search in filters", you offer website visitors the ability to search within the filters to more easily reach the desired set of filter values. This way, the desired color, brand, or other property is quickly found.
This functionality works out-of-the-box in our Magento plugins and JavaScript implementation. Based on this setting, the API is expanded with the following information:
<issearchable>true/false 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>