Appearance
clearCart
Definition
When no sw-context-token given then this method return an empty cart with the new sw-context-token.
When sw-context-token given then this method simply returns the current state of the cart.
As the purpose of this method is not clear we recommend to use getCart
method because its behaviour seems to be the same.
Signature
ts
export async function clearCart(
contextInstance: ShopwareApiInstance = defaultInstance
): Promise<ContextTokenResponse>
Parameters
Name | Type | Description |
---|---|---|
contextInstance | ShopwareApiInstance | instance of the api client (by default it's an Axios instance) |
Return type
ts
Promise<ContextTokenResponse>
Usage example
WARNING
Example is generated automatically. Sometimes it's required to be adjusted to your needs.