Customer
The customer
object describes a customer, including their name, contact information, order history, and preferences.
Usage Example
{%- comment -%} Show customer profile summary {%- endcomment -%}
<p>
Name: {{ customer.name }}<br>
Email: {{ customer.username }}<br>
Orders: {{ customer.order_count }}<br>
Total Spent: {{ customer.order_total }} {{ customer.currency.symbol }}
</p>
Properties
accepts_marketing
Returns true if the customer has accepted marketing.
address
Returns the customer’s address.
audiences
Returns the names of the audiences the customer belongs to.
currency
Returns the customer’s currency.
customer_number
Returns the customer number.
first_name
Returns the customer’s first name.
first_order_date
Returns the date of the first order placed by the customer.
has_access
Returns true if the user has been granted access to this store.
id
Returns the unique id for this customer.
language
Returns the customer’s language.
last_name
Returns the customer’s last name.
last_order_date
Returns the date of the last order placed by the customer.
loyalty_discount_progress
Returns the progress of the customer towards the next loyalty discount. Includes:
title
,description
,total_spent
,is_stackable
,is_combinable
,is_fixed_discount
,current_level
,discount
,threshold
,valid_until
,next_level
,discount
,threshold
name
Returns the full name for this customer.
order_count
Returns the total number of orders placed by the customer.
order_total
Returns the total amount spent by the customer.
orders
Returns the customer’s orders.
refund_count
Returns the total number of refunds made by the customer.
refund_total
Returns the total amount refunded by the customer.
tags
Returns customer tags.
username
Returns the customer’s username.