Liquid Template Variables - address
From Spiffy Stores Knowledge Base
Address objects are found in order confirmation emails and the Additional Content & Scripts section of the Checkout.
Customers will also have one or more address objects.
Example usage:
Format an address object for displaying in a confirmation email:
Shipping address: {{ shipping_address.name }} {{ shipping_address.street }} {{ shipping_address.city }}, {{ shipping_address.province }} {{ shipping_address.zip }} {{ shipping_address.country }} {{ shipping_address.phone }}
Contents
- 1 Reference
- 1.1 address.id
- 1.2 address.name
- 1.3 address.title
- 1.4 address.title_supplied
- 1.5 address.first_name
- 1.6 address.last_name
- 1.7 address.street
- 1.8 address.address1
- 1.9 address.address2
- 1.10 address.company
- 1.11 address.city
- 1.12 address.province
- 1.13 address.province_code
- 1.14 address.zip
- 1.15 address.country
- 1.16 address.country_upper
- 1.17 address.country_code
- 1.18 address.phone
- 1.19 address.summary
Reference
address.id
A unique identifier for the Address.
address.name
Name of the addressee.
You can also use address.first_name and address.last_name to access the individual parts if you want to display the customer name with special formatting.
Example usage:
{{ billing_address.last_name }}, {{ billing_address.first_name }} => Bloggs, Fred
address.title
The title of the addressee.
address.title_supplied
The customer has provided an honorific to be used as a title in the address.
address.first_name
The first name of the addressee.
address.last_name
The last name of the addressee.
address.street
The street address of the addressee.
This is a combined address, made up of both address1 and address2.
address.address1
The first line of the address.
address.address2
The second line of the address. Nil is returned if a second address line does not exist.
address.company
The company name, if supplied. Nil is returned if a company name does not exist.
address.city
The city of the addressee.
address.province
The full name of the province, state or region. This is not an abbreviated value. Nil is returned if a province, state or region does not exist.
address.province_code
The standard ISO abbreviation for the province, state or region. Nil is returned if a province, state or region does not exist.
address.zip
The Zip or Postal code.
1234
address.country
The full name of the country. This is not an abbreviated value.
Australia
address.country_upper
The full name of the country in upper case. This is not an abbreviated value.
AUSTRALIA
address.country_code
The standard ISO abbreviation of the country.
AU
address.phone
The phone number, if supplied.
address.summary
Returns a summary of the store's address:
123 Main Street, Sydney, New South Wales, Australia
The summary takes the form street, city, state/province, country.