Optional
autocompletePreact autocomplete main component
Optional
autocompleteMinimal input length to render autocomplete
Optional
autocompleteDefault autocomplete page query parameters. Supplied as an object or a function that returning search query Functional version can be use for building complex autocomplete queries. It's more flexible and provides access to other config parameters.
Optional
categoryCategory root component
Optional
categoryCSS selector for category content rendering
Optional
categoryEnable category fallback when service is unavailable (overwrites global fallback
option).
By default it will redirect to original page by disabling new page. If custom function is provided, it will be called with query object.
It's important that this path does not have same path as search page.
Optional
categoryreturns current category id
Optional
categoryreturns current category path
Optional
categoryDefault category page query parameters. Supplied as an object or a function that returning search query Functional version can be use for building complex category queries. It's more flexible and provides access to other config parameters.
Indicates if URL parameters should be compressed. If enabled, default range separator is '~'.
Optional
contentCSS selector for search page rendering.
Optional
debounceDebounce delay for search input
Merchant's default Currency.
Optional
dropdownCSS selector for autocomplete dropdown render. Leave undefined for default use (After input element)
Optional
fallbackEnabled fallback for serp & category pages when service is unavailable By default, it will restore the native content.
If set to 'legacy', it will force a page reload and disable the search for the current session.
CSS selector for form to unbind it.
Optional
formForm unbind delay after how long it should delay, default is unbinding without delay ms
Optional
historyHistory component
Optional
historyIndicates if history should be enabled
Optional
historyHistory size
Optional
inputCSS selector for each input element to bind search events like input change and form submit.
Optional
isDetermine if current page is category Example: return location.pathname.includes('category')
Merchant ID.
Optional
persistentEnable persistent caching for search results.
If enabled, the search results will be restored from cache when returning to the search page, from example, from a product page.
The cache is stored in the browser's session storage.
Optional
queryCustom function, when provided, can be used to modify search query before sending it to the server. A default implementation is provided in the config that returns the query without any modification. Note: The query parameter itself should not be touched, but instead a new object should be returned in case modifications are needed.
SearchQuery
PageType | undefined
Optional
retriesNumber of retries for search request. Retries won't be applied for autocomplete requests.
Optional
retryInterval between retries in milliseconds
Optional
serpPreact search page main component.
Optional
serpEnable search fallback when service is unavailable (overwrites global fallback
option).
By default it will redirect to original page by disabling new page. If custom function is provided, it will be called with query object.
It's important that this path does not have same path as search page.
Optional
serpSearch page path, renders in any page if not specified
Optional
serpIndicates if search should redirect to search page or just rewrite history
Optional
serpDefault search page query parameters. Supplied as an object or a function that returning search query Functional version can be use for building complex search queries. It's more flexible and provides access to other config parameters.
Optional
serpDelay serp page rendering given until given async function resolves Default function waitForElement can be imported from "@nosto/preact"
Optional
serpFront end URL both ways mapping, to convert URL param values and keep the request keys { query: 'q' - will map query param to appear as q in URL product.filters: 'ff' - will map to ff.0.field.0: 'brand' and so on.. product.size: 'size' - will map to size: 24 }
Optional
variationreturn current variation id, can be supplying for supplying multi-currency and B2B variations
User provided configuration