All guides

Guide

Shopify Liquid Cheat Sheet 2026

Customer Object

Only available when a customer is logged in — always check {% if customer %} first.

01

customer.first_name / last_name / email / id

Core customer details.

{% if customer %}Welcome back, {{ customer.first_name }}{% endif %}
02

customer.accepts_marketing

Whether the customer has agreed to receive marketing email.

{% if customer.accepts_marketing %}Subscribed{% endif %}
03

customer.has_account

true if the customer has created an account.

{{ customer.has_account }}
04

customer.addresses / addresses_count / default_address

Saved addresses, how many there are, and the default one.

{{ customer.default_address.city }}
05

customer.orders / orders_count

Past orders — used on account templates.

{{ customer.orders_count }} orders

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