Skip to content
On this page

removeCartItem

Definition

Deletes the cart line item by id.

This method may be used for deleting "product" type item lines as well as "promotion" type item lines.

Signature

ts
export async function removeCartItem(
  itemId: string,
  contextInstance: ShopwareApiInstance = defaultInstance,
): Promise<Cart> 

Parameters

NameTypeDescription
itemId
string
- id of the cart line item
contextInstance
ShopwareApiInstance
- instance of the api client (by default it's an Axios instance)

Return type

ts
Promise<Cart>

Usage example

WARNING

Example is generated automatically. Sometimes it's required to be adjusted to your needs.

Open in StackBlitz

removeCartItem has loaded