ProductListingActions (Commerce Engine)
ProductListingActions (Commerce Engine)
|
|
Note
This component was introduced in version |
The product listing action creators.
See Dispatch Actions.
Loader Function
loadProductListingActions
Loads the commerce product listing reducer and returns the available product listing action creators.
Parameters
-
engine:
CommerceEngineThe headless commerce engine.
Returns ProductListingActionCreators: The product listing action creators.
ProductListingActionCreators
fetchMoreProducts
Fetches and additional page of products and appends it to the current list.
Returns AsyncThunkAction<QueryCommerceAPIThunkReturn | null, void, AsyncThunkCommerceOptions<StateNeededByFetchProductListing>>: A dispatchable action.
fetchProductListing
Refreshes the product listing.
Returns AsyncThunkAction<QueryCommerceAPIThunkReturn, void, AsyncThunkCommerceOptions<StateNeededByFetchProductListing>>: A dispatchable action.
promoteChildToParent
Promotes a child product to a parent product.
Parameters
-
payload:
PromoteChildToParentPayloadThe action creator payload.
Returns PayloadAction<PromoteChildToParentPayload>: A dispatchable action.
Related types
PromoteChildToParentPayload
Properties
-
child:
Omit<BaseProduct, 'children' | 'totalNumberOfChildren'> -
query:
stringThe initial basic query expression for instant products.
-
id:
stringThe search box ID.