ProductListingActions (Commerce Engine)
ProductListingActions (Commerce Engine)
This is for:
DeveloperThe 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:
CommerceEngine
The 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:
PromoteChildToParentPayload
The action creator payload.
Returns PayloadAction<PromoteChildToParentPayload>
: A dispatchable action.
Related Types
PromoteChildToParentPayload
Properties
-
child:
Omit<BaseProduct, 'children' | 'totalNumberOfChildren'>
-
query:
string
The initial basic query expression for instant products.
-
id:
string
The search box ID.