queueOrder(action: BasketAction): Promise<void>¶
The queueOrder
method allows to queue an order for processing.
Input parameters¶
action¶
action
is a mandatory parameter of the BasketAction type that represents the action that we want to perform with a given order.
Returned value¶
A returned value has a type of Promise<void>
as it returns nothing.
Example¶
In this example we make a basketUpdaterApi
call to queue an order for processing. We also retrieve a queue order action with the help of a basketOverallApi
useStorefront(async (storefront) => {
const basketOverallApi = storefront.getApiSync('basketOverallApi');
const basketUpdaterApi = storefront.getApiSync('basketUpdaterApi');
const queueOrderAction = basketOverallApi.getActions().queueOrder;
basketUpdaterApi.queueOrder(queueOrderAction);
});
Basket Updater API methods reference¶
- getBasket - Retrieve the contents of a basket
- getCurrentBasket - Retrieve the current active basket
- refreshBasket - Refresh the contents of a basket
- addItem - Add an item to the basket
- emitUpdateBasketEvent - Emit an update basket event
- uploadVariantFile - Upload a file for a variant
- placeOrder - Place an order using the basket