Skip to content
On this page

addCartItems ​

Definition ​

Adds multiple items to the cart. Accepts every type of cart item.

Signature ​

ts
export async function addCartItems(
  items: Partial<LineItem>[],
  contextInstance: ShopwareApiInstance = defaultInstance,
) 

Parameters ​

NameTypeDescription
items
Array<Partial<LineItem>>
- array of cart items
contextInstance
ShopwareApiInstance
- instance of the api client (by default it's an Axios instance)

Usage example ​

WARNING

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

Open in StackBlitz

addCartItems has loaded