Gravatar for a.a.ananthakrishnan@accenture.com

Question by ananthksky, Apr 15, 2019 8:34 AM

Coveo Facet Search with Custom Submit button

Hi All,

Currently in our application search filter is using the default coveo behavior (i.e. when clicking on any facets it will trigger the search results automatically from coveo index). But we have the requirement to customize the behavior by giving an option to select the multiple facets and search will trigger only based on custom apply button. Please let us know if any one implemented the similar functionality.

Thanks,

Ananth

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Apr 15, 2019 6:46 PM

When selecting a facet value, a query must be made to get new facet values for the selected facet and all the other ones. This is inevitable.

I tweaked the mobile facets to behave a bit like what you want on https://commerce.coveodemo.com

If you load it on a mobile device, you will see a big "Filters" button. Once clicked, it shows the facets in an absolutely positioned div on top of the search results. You can select multiple facet values. Each time you select a facet value, a query is made and search results are updated under the facets div. When you finally click the "Apply" button, the div is just hidden and the user see the updated search results.

Gravatar for a.a.ananthakrishnan@accenture.com

Comment by ananthksky, Apr 16, 2019 9:36 AM

Hi Jean-Francois,

Thanks for your valuable comments. As per your comment I understood, "Filter" button just will do the hide operation. It will not do any filter operations. But my requirement is we need to trigger the search call when user click on the submit button, instead of check-box change event for both mobile and desktop mode. Can you please share your thoughts to implement this requirement.

Thanks,

Ananth

Ask a question