The address object contains information a customer entered on the checkout pages. A customer can enter two addresses: a billing address and a shipping address.

When you access the attributes of the address object, you need to say which address you mean. Use shipping_address or billing_address before the attribute.

address can be used in email templates, on the order status page of the checkout and in apps such as order printers.

address.address1

Returns the value of the Address1 field of the address.

address.address2

Returns the value of the Address2 field of the address.

address.city

Returns the value of the City field of the address.

address.company

Returns the value of the Company field of the address.

address.country

Returns the value of the Country field of the address.

{{ shipping_address.country }}
Germany

address.country_code

Returns the value of the Country field of the address in ISO 3166-2 format.

{{ shipping_address.country_code }}
DE

address.first_name

Returns the value of the First name field of the address.

address.last_name

Returns the value of the Last name field of the address.

address.name

Returns the values of the First name and Last name fields of the address.

Hello, {{ billing_address.name }}
Hello, Jane Doe

address.phone

Returns the value of the Phone field of the address.

address.province

Returns the value of the Province/State field of the address.

{{ billing_address.province }}
Lower Saxony

address.province_code

Returns the abbreviated value of the Province/State field of the address.

{{ billing_address.province_code }}
NDS

address.street

Returns the combined values of the Address1 and Address2 fields of the address.

{{ shipping_address.street }}
Example Street 22, Building B

address.url

Returns the relative URL of the address.

{{ address.url }}
/account/addresses/12345

address.zip

Returns the value of the Postal/ZIP field of the address.

More properties

VersaCommerce also provides these properties on the address object:

Properties Returns
id, zipcode, summary, firstname, lastname Address ID, postal code, formatted summary and name aliases