cart
A customer’s cart.
Properties
The cart-specific discount applications for the cart.
The currency of the cart.
If the store uses multi-currency, then this is the same as the customer's local (presentment) currency. Otherwise, it's the same as the store currency.
You can output the store's available currencies using shop.enabled_currencies.
The discount applications for the cart.
Example
Display discount applications
{{#each cart.discount_applications as |discount_application|}}
Discount name: {{ discount_application.title }}
Savings: - {{money discount_application.total_allocated_amount}}
{{/each}}
Returns true if there are no items in the cart. Return's false if there are.
The number of items in the cart.
The line items in the cart.
The total price of all of the items in the cart in the currency's subunit, after any line item discounts. This doesn't include taxes (unless taxes are included in the prices), cart discounts, or shipping costs.
The value is output in the customer's local (presentment) currency.
Use money filters to output a formatted amount.
The total price of all of the items in the cart in the currency's subunit, before discounts have been applied.
The value is output in the customer's local (presentment) currency.
Use money filters to output a formatted amount.
Returns true if any of the products in the cart require shipping. Returns false if not.
Returns true if taxes are included in the prices of products in the cart. Returns false if not.
This can be set in a store’s tax settings.
If the store includes or exclude tax based on the customer’s country, then the value reflects the tax requirements of the customer’s country.
The total amount of all discounts (the amount saved) for the cart in the currency's subunit.
The value is output in the customer's local (presentment) currency.
Use money filters to output a formatted amount.
The total price of all of the items in the cart in the currency's subunit, after discounts have been applied.
The value is output in the customer's local (presentment) currency.
Use money filters to output a formatted amount.
The total weight of all of the items in the cart in grams.