CartRecalculationMode
Controls how much of the cart is recalculated when one of its items is added, changed or removed. Only item mutations are affected — every other mutation always recalculates the whole cart
enum CartRecalculationMode {
FULL
CHANGED_ITEMS_ONLY
}
Values
CartRecalculationMode.FULL
Every item mutation refetches product data and reprices every line in the cart (default). Always up to date, and the cost of a single change grows with the size of the cart
CartRecalculationMode.CHANGED_ITEMS_ONLY
An item mutation fetches product data and prices only for the lines it touches, and reuses the previous calculation for the rest. Intended for large, long-lived carts. Product data, prices and orderability of untouched lines may be stale for as long as the cart lives; the whole cart is refreshed and checked before an order is placed, and by any non-item mutation. Carts in this mode must be processed with cartValidateAndProcess rather than cartProcess
Member Of
Cart object ● CartStartInput input ● CartUpdateInput input