Cart.liquid
From Spiffy Stores Knowledge Base
This template is used to render the shopping [Liquid Template Variables - cart|cart]] page.
This is where the customer can review all the items purchased before proceeding to checkout.
You should always include a condition to check whether the shopping cart is empty or not.
For example:
{% if cart.item_count == 0 %}
To the list all the items in a cart, use the following code:
<ul> {% for item in cart.items %} <li>{{ item.quantity }} x {{ item.title }}</li> {% endfor %} </ul>
This example would create a list of all items in the cart including the quantity of each item.
In addition, a cart should include the price of each item, and the total amount of all the purchases.
Variables
In cart.liquid you have access to the following variables:
In addition, all global variables are available.