Home > @vue-storefront/magento-api > addConfigurableProductsToCart
addConfigurableProductsToCart() function
Adds a set of configurable products to a specified cart
Signature:
export default function addConfigurableProductsToCart(context: Context, input: AddConfigurableProductsToCartInput, customQuery?: CustomQuery, customHeaders?: CustomHeaders): Promise<FetchResult<AddConfigurableProductsToCartMutation>>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| context | Context | VSF Context |
| input | AddConfigurableProductsToCartInput | ID of the cart and products to be added |
| customQuery | CustomQuery | (Optional) (optional) - custom GraphQL query that extends the default one |
| customHeaders | CustomHeaders | (Optional) (optional) - custom headers that extends the default headers |
Returns:
Promise<FetchResult<AddConfigurableProductsToCartMutation>>