Home > @vue-storefront/magento-api > addDownloadableProductsToCart

addDownloadableProductsToCart() function

Adds a set of downloadable products to a specified cart

Signature:

export default function addDownloadableProductsToCart(context: Context, input: AddDownloadableProductsToCartInput, customQuery?: CustomQuery, customHeaders?: CustomHeaders): Promise<FetchResult<AddDownloadableProductsToCartMutation>>;

Parameters

Parameter Type Description
context Context VSF Context
input AddDownloadableProductsToCartInput ID of the cart and products to be added
customQuery CustomQuery (Optional) custom GraphQL query that extends the default one
customHeaders CustomHeaders (Optional) (optional) - custom headers that extends the default headers

Returns:

Promise<FetchResult<AddDownloadableProductsToCartMutation>>