updateCartPromotionsWorkflow. Computes promotion actions for the requested codes, then prepares line-item and shipping-method adjustments so each promotion only discounts the owning seller’s items, before creating/removing adjustments and syncing the cart’s applied promotions. Optionally refreshes the payment collection. Triggered by POST /store/carts/:id/promotions.
Usage
Input
The cart to update promotions on.
Promotion codes to apply; defaults to
[].One of
add, remove, replace; defaults to add.Preloaded cart data; skips the internal cart fetch when provided.
Refresh the cart’s payment collection after adjustments change.
Result
No return value; the cart’s adjustments and applied promotions are updated as a side effect.
Hooks
validate— runs after the cart is loaded with{ input, cart }.