Skip to content

customer

The signed-in customer, or nil for guests. Available globally.

Example

{% if customer %}Hi {{ customer.first_name }}!{% else %}Welcome!{% endif %}

Output:

Hi Asha!

Properties

PropertyDescription
customer.accepts_marketingtrue when opted in to marketing.
customer.addressesAll saved addresses.
customer.addresses_count
customer.addresses_proxy
customer.count
customer.default_addressDefault address.
customer.emailEmail address.
customer.first_nameFirst name.
customer.idUnique identifier.
customer.last_nameLast name.
customer.nameName.
customer.orders_countNumber of orders.
customer.phonePhone number.
customer.review_rewards
customer.review_rewards_count
customer.review_rewards_proxy
customer.store_credit_account
customer.tagsTags as an array of strings.
customer.tax_exempt
customer.toArray
customer.total_spent

Property list is generated from the storefront engine (CustomerDrop), so it always matches what your theme can use. Inspect live values with {{ customer | json }}.