Home > @shopware-pwa/shopware-6-client > addCartItemQuantity
# addCartItemQuantity() function
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Warning: This API is now obsolete.
This method is redundand and will not be supported. Use changeCartItemQuantity() instead.
Increases the current quantity in specific cart line item by given quantity.
Example: If current quantity is 3 and you pass 2 as quantity parameter, you will get a new cart's state with quantity 5.
Signature:
export declare function addCartItemQuantity(itemId: string, quantity: number, contextInstance?: ShopwareApiInstance): Promise<Cart>;
# Parameters
Parameter | Type | Description |
---|---|---|
itemId | string | |
quantity | number | |
contextInstance | ShopwareApiInstance |
Returns:
Promise<Cart>
# Exceptions
ClientApiError