Appearance
addPromotionCode
Definition
Adds new promotion code to the cart by its code.
Promotion code is being added as separate cart item line.
Signature
ts
export async function addPromotionCode(
promotionCode: string,
contextInstance: ShopwareApiInstance = defaultInstance,
): Promise<Cart>
Parameters
Name | Type | Description |
---|---|---|
promotionCode | string | - code of the promotion |
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.