Entities

Cart

Cart entity - components, queries, links, and related actions

Your storefront encounters the Cart entity when a visitor adds products to their shopping session. A Cart holds summary information such as the total item count and cost breakdowns. Individual line items are represented as separate CartItem entities linked from the Cart.

Components

Base

CartBase

base
Total item quantity, custom fields, and an optional checkout link.
totalQuantity
numberrequired

Total number of items in the cart.

customFields
Record<string, unknown>

Cost

CartCost

cost
Price breakdown for the entire cart: subtotal, total, shipping, duty, and tax information.
subtotalIsEstimated
booleanrequired

Whether the subtotal is estimated.

totalIsEstimated
booleanrequired

Whether the total is estimated.

Queries

  • CartItemsLink CartItem multi - All line items in the cart.
  • Product - Products whose variants can be added to the cart.
  • ProductVariant - The purchasable SKUs added to the cart as line items.