---
layout: default
title: cart
nav:
group: Liquid Variables
---
# cart
The cart object has the following attributes:
{% table_of_contents %}
{% anchor_link "cart.attributes", "cart-attributes" %}
cart.attributes allow the capturing of more information on the cart page. This is done by giving an input a nameattribute with the following syntax:
cart.attributes can be accessed in order email templates, the Thank You page of the checkout, as well as in apps such as Order Printer.
Input
Output
Returns the number of items inside the cart.
Input
Output
Returns all of the line items in the cart.
{% anchor_link "cart.note", "cart-note" %}cart.note allows the capturing of more information on the cart page.
This is done by submitting the cart form with an HTML textarea and wrapping the cart.note output.
{% raw %}{{ cart.note }}{% endraw %} on the cart page. If there are multiple instances, the one that comes latest in the Document Object Model (DOM) will be submitted with the form.
{% endblock %}
cart.note can be accessed in order email templates, the Thank You page of the checkout, as well as in apps such as Order Printer. For examples on how to use cart notes, see Ask a customer for additional information.
Input
Output
Returns the total price of all of the items in the cart.
{% anchor_link "cart.total_weight", "cart-total_weight" %}Returns the total weight of all of the items in the cart.