Skip to main content

Type Alias: RecalculateCart()

RecalculateCart: (cartId, companyId?, priceType?, priceListGroup?, embedTemplateId?) => Promise<RecalculateCartResponse>

Recalculates the cart items based on the provided parameters, such as company ID, price type, and price list group.

Parameters

cartId

string

The unique identifier for the cart.

companyId?

string

(Optional) The company ID to use for recalculation.

priceType?

string

(Optional) The price type to use for recalculation.

priceListGroup?

string

(Optional) The price list group to use for recalculation.

embedTemplateId?

string

(Optional) ID of currently used embed template

Returns

Promise<RecalculateCartResponse>

A promise that resolves to an array of CartItem with updated information.

Throws

Error Will throw an error if cartId is missing.

Example usage:

const updatedCartItems = await window.mimeeqApp.actions.recalculateCart('cart123', 'company789', 'retail', 'groupA');
console.log(updatedCartItems);