StandaloneSearchBoxSetActions (Commerce Engine)

This is for:

Developer

The commerce standalone search box set action creators.

Loader Function

loadStandaloneSearchBoxSetActions

Loads the standalone search box set reducer and returns the available commerce standalone search box set action creators.

Parameters

  • engine: CommerceEngine

    The headless commerce engine.

Returns StandaloneSearchBoxSetActionCreators: The commerce standalone search box set action creators.

StandaloneSearchBoxSetActionCreators

fetchRedirectUrl

Preprocesses the query for the current headless state, and retrieves a redirection URL if a redirect trigger was fired in the query pipeline.

Parameters

Returns AsyncThunkAction<string, FetchRedirectUrlPayload, AsyncThunkCommerceOptions<StateNeededForRedirect>>: A dispatchable action.

registerStandaloneSearchBox

Registers a standalone search box.

Parameters

Returns PayloadAction<RegisterStandaloneSearchBoxPayload>: A dispatchable action.

resetStandaloneSearchBox

Resets the standalone search box state. To be dispatched on single page applications after the redirection has been triggered.

Parameters

Returns PayloadAction<ResetStandaloneSearchBoxPayload>: A dispatchable action.

updateStandaloneSearchBoxRedirectionUrl

Updates the redirection URL of the standalone search box.

Parameters

Returns PayloadAction<RegisterStandaloneSearchBoxPayload>: A dispatchable action.

FetchRedirectUrlPayload

Properties

  • id: string

    The standalone search box id.

RegisterStandaloneSearchBoxPayload

Properties

  • id: string

    The standalone search box id.

  • redirectionUrl: string

    The default URL to which to redirect the user.

  • overwrite?: boolean

    Whether to overwrite the existing standalone search box with the same id.

ResetStandaloneSearchBoxPayload

Properties

  • id: string

    The standalone search box id.