Cart
The cart is platform data presented by the theme. Liquid receives cart and a prepared cart_view; developer-mode JavaScript may use the public cart helpers.
Use fetchThemeCart, addThemeCartItem, updateThemeCartItemQuantity, removeThemeCartItem and the prepared cart view helpers rather than calling an endpoint directly. useThemeCart supplies a React state wrapper when custom React behavior is appropriate.
Cart drawer and cart-page markup, labels, layout, icons and CSS remain in the theme. Use the relevant themeRuntimeProps.cart* attributes to connect those elements to shared behavior.
Listen for the cart-updated runtime event when another theme component must refresh after a successful change. Do not assume an optimistic value is final; the returned cart is authoritative.
Test an empty cart, several line items, quantity changes, removal, discounts, booking lines, missing media and unavailable checkout. A summary should render only from real cart totals and errors.