Difference between revisions of "Liquid Template Variables - customer"

From Spiffy Stores Knowledge Base

m
Line 33: Line 33:
 
Returns the customer's name, including the title.
 
Returns the customer's name, including the title.
  
== <code>customer.credit</code> ==
+
== <code>customer.title_option_tags</code> ==
 
 
== <code>customer.reset_password_token</code> ==
 
 
 
== <code>customer.wholesale (boolean)</code> ==
 
 
 
== <code>customer.full_name</code> ==
 
  
== <code>customer.title_option_tags</code> ==
+
Returns a set of HTML <nowiki><option></nowiki> tags containing the possible set of titles that can be used.
  
 
== <code>customer.default_address</code> ==
 
== <code>customer.default_address</code> ==
Line 60: Line 54:
  
 
== <code>customer.errors</code> ==
 
== <code>customer.errors</code> ==
 +
 +
== <code>customer.credit</code> ==
 +
 +
== <code>customer.reset_password_token</code> ==
 +
 +
== <code>customer.wholesale</code> ==
  
 
== <code>customer.metafields</code> ==
 
== <code>customer.metafields</code> ==

Revision as of 10:47, 12 February 2016

The Liquid template variable customer has the following attributes:

The Customer object is available in order notification objects and in the Checkout Additional Content & Scripts section, as well as in the customer templates.

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.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.title_option_tags

Returns a set of HTML <option> tags containing the possible set of titles that can be used.

customer.default_address

customer.addresses

customer.addresses_count

customer.orders

customer.orders_count

customer.recent_order

customer.total_spent

customer.new_address

customer.errors

customer.credit

customer.reset_password_token

customer.wholesale

customer.metafields

Return the metafields for the customer.

Metafields can only be managed using the Spiffy Stores API.