Skip to main content
Returns the complete cart object with all data.

Parameters

None

Returns

ShopifyCart | null Returns null if the cart has not been initialized.

Examples

Get cart data

Display cart totals

Check if cart is empty

This is a synchronous method that returns cached cart state. For reactive updates, use .subscribe().