Skip to main content

shopify:search:update

Fires when a buyer submits a search, or changes the filters or sort order on results they already have.

You can use this to see what buyers are looking for in their own words, and which searches come back empty. Search and merchandising apps use it to improve results or to surface something else when nothing matched.

The event carries the query, filters, and sort order. The promise resolves with the total number of results, once the storefront has run the search.

You dispatch it from the search's filter form. query carries the current search term and persists when the buyer changes only the filters. A failed search rejects the promise.

required

The query, filters, and sort order the buyer submitted.

Anchor to promise
promise
Promise<>
required

Resolves once the storefront knows how many results matched.

Anchor to detail
detail
Record<string, unknown>

Optional custom data for the storefront's internal use. Listeners can read it.


Was this page helpful?