All guides

Guide

Shopify Liquid Cheat Sheet 2026

Cart Object

Available on every page through the global cart object.

01

cart.item_count

Total quantity of items in the cart.

{{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }}
02

cart.items

The cart's line items.

{% for item in cart.items %}
  {{ item.title }} × {{ item.quantity }} — {{ item.final_line_price | money }}
{% endfor %}
03

cart.total_price

Total price after discounts, in cents.

{{ cart.total_price | money }}
04

cart.total_weight

Total weight in grams.

{{ cart.total_weight | weight_with_unit }}
05

cart.note

The order note entered by the customer.

<textarea name="note">{{ cart.note }}</textarea>
06

cart.attributes

Custom information collected in the cart, submitted with attributes[Name] fields.

<input name="attributes[Gift message]" value="{{ cart.attributes['Gift message'] }}">

Shopify experts

Let's talk ecommerce, Shopify & Shopify Plus solutions.

DROPSHIP HUBS helps ecommerce brands build, improve, and grow Shopify stores. We support new builds, migrations, ongoing development, SEO, and conversion optimisation.

Our team can help plan the right approach based on your store, goals, and current challenges.

Get in touch