Liquid Template Variables - customer
From Spiffy Stores Knowledge Base
The Customer object is available in order notification objects and in the Checkout Additional Content & Scripts section, as well as in the customer templates.
The Liquid template variable customer has the following attributes:
Contents
- 1 customer.id
- 2 customer.email
- 3 customer.title
- 4 customer.title_supplied
- 5 customer.first_name
- 6 customer.last_name
- 7 customer.name
- 8 customer.full_name
- 9 customer.company
- 10 customer.title_option_tags
- 11 customer.default_address
- 12 customer.addresses
- 13 customer.addresses_count
- 14 customer.customer_credits
- 15 customer.customer_credits_count
- 16 customer.orders
- 17 customer.orders_count
- 18 customer.recent_order
- 19 customer.last_order
- 20 customer.tags
- 21 customer.total_spent
- 22 customer.new_address
- 23 customer.errors
- 24 customer.credit
- 25 customer.reset_password_token
- 26 accepts_marketing
- 27 customer.wholesale
- 28 customer.metafields
- 29 Further Reference
customer.id
Returns the unique internal number of the customer.
This is normally only for internal usage.
customer.email
Returns the email address of the customer.
customer.title
Returns the customer's title, such as 'Mr', 'Mrs', 'Ms', 'Dr' or 'Professor'
customer.title_supplied
The customer has provided an honorific to be used as a title.
customer.first_name
Returns the customer's first name.
customer.last_name
Returns the customer's last name.
customer.name
Returns the customer's name, without a title.
customer.full_name
Returns the customer's name, including the title.
customer.company
Returns the customer's company.
customer.title_option_tags
Returns a set of HTML <option> tags containing the possible set of titles that can be used. These option tags can be wrapped within a <select> tag to create an option drop-down selection for the customer's title.
customer.default_address
Return the customer's default address.
customer.addresses
Return an array of all the customer's addresses.
customer.addresses_count
Return the number of addresses that the customer has.
customer.customer_credits
Return an array of all the customer's credits.
customer.customer_credits_count
Return the number of customer credits that the customer has.
customer.orders
Return an array of all the customer's orders.
customer.orders_count
Return the number of orders that the customer has placed.
customer.recent_order
Return the most recent order placed by the customer.
customer.last_order
Return the most recent paid order placed by the customer.
customer.tags
Return an array of all the tags assigned to this customer.
customer.total_spent
Return the total amount spent by this customer.
customer.new_address
Return a new empty address for the customer.
customer.errors
Return any error messages that were detected for this customer.
customer.credit
Return the amount of credit that the customer has in their account.
customer.reset_password_token
Return the current reset password token that can be used by the customer to access their account when the password has been forgotten.
accepts_marketing
Returns true if the customer has indicated that they want to receive marketing emails.
customer.wholesale
Returns true if the customer has wholesale status, and is eligible to purchase products using the wholesale price for the product.
customer.metafields
Return the metafields for the customer.
Metafields can only be managed using the Spiffy Stores API.