Skip to main content

getCart

Returns the current cart without changing it.

You can use this to read cart contents before deciding what to do, or to reconcile your own state with the current cart.

getCart isn't configurable, so it returns the same shape on every storefront. cart is null when the buyer doesn't have a cart yet.

If several parts of the page ask for the cart at the same time, then they share one request rather than each making their own.

Reads the current cart. This action isn't configurable, so it returns the same cart on every storefront.

Anchor to payload
payload
Anchor to options
options

Promise<>

Was this page helpful?