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
| Property | Description |
|---|---|
customer.accepts_marketing | true when opted in to marketing. |
customer.addresses | All saved addresses. |
customer.addresses_count | — |
customer.addresses_proxy | — |
customer.count | — |
customer.default_address | Default address. |
customer.email | Email address. |
customer.first_name | First name. |
customer.id | Unique identifier. |
customer.last_name | Last name. |
customer.name | Name. |
customer.orders_count | Number of orders. |
customer.phone | Phone number. |
customer.review_rewards | — |
customer.review_rewards_count | — |
customer.review_rewards_proxy | — |
customer.store_credit_account | — |
customer.tags | Tags 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 }}.