Object: address
The address object can be found as a property on the following objects:
- account object (see
.billing_addresses
and.shipping_addresses
) - checkout object (see
.billing_address
and.shipping_address
) - customer-enquiry object (see
.billing_address
) - customer-enquiry-invoice object (see
.billing_address
) - financial-transaction object (see
.billing_address
and.shipping_address
) - sales-order object (see
.billing_address
and.shipping_address
)
Variables
.id
Address internal unique ID. Can be used to generate unique element IDs and reference specific address record when updating or deleting it.
Examples
CODEaddress.id
OUTPUT123
.line1, .line2 & .line3
Address lines. Free text containing specific address details, such as streen, building, floor etc.
Examples
CODEaddress.line1
OUTPUT123 Main Rd.
CODEaddress.line2
OUTPUTBuilding A, 2nd floor
CODEaddress.line3
OUTPUTOffice 132
.city
City / town / village name.
Examples
CODEaddress.city
OUTPUTParis
.region
Region / state / province name.
Examples
CODEaddress.city
OUTPUTParis
.country
Country information object.
Examples
CODEaddress.country.code
OUTPUTDE
CODEaddress.country.name
OUTPUTGermany
.code
ZIP / area / postal code.
Examples
CODEaddress.code
OUTPUT2048
.metadata
Address metadata object. Metadata object is used to access additional address information that have been stored with the address.
Examples
CODEaddress.metadata.use
OUTPUTshipping
Variable Dump
Copy and paste the below HTML into any template page, to see all address data dumped to your page. You can then simply remove the unnecessary fields and other elements, and format the remaining fields however necessary to achieve the desired look and feel. Note that the dump assumes that address
object is available in the current scope. Change this if your address object is available under another name.
<style> .thedump .name{ background-color:#3A5FCD; color:white; padding:0.5em; font-weight:bold; } .thedump .code{ background-color:#888888; color:white; padding:0.5em; } .thedump .out{ background-color:white; color:#555555; padding:0.5em; border-bottom:1px solid #CCCCCC; margin-bottom:1em; } .thedump .code pre{ padding:0; margin:0; font-size:1.1em; } </style> <div class="thedump"> <div class="name">Address ID</div> <div class="code"><pre>{{ address.id }}</div> <div class="out">{{ address.id }}</div> <div class="name">Address line 1</div> <div class="code"><pre>{{ address.line1 }}</div> <div class="out">{{ address.line1 }}</div> <div class="name">Address line 2</div> <div class="code"><pre>{{ address.line2 }}</div> <div class="out">{{ address.line2 }}</div> <div class="name">Address line 3</div> <div class="code"><pre>{{ address.line3 }}</div> <div class="out">{{ address.line3 }}</div> <div class="name">Address city</div> <div class="code"><pre>{{ address.city }}</div> <div class="out">{{ address.city }}</div> <div class="name">Address region</div> <div class="code"><pre>{{ address.region }}</div> <div class="out">{{ address.region }}</div> <div class="name">Country Code</div> <div class="code"><pre>{{ address.country.code }}</div> <div class="out">{{ address.country.code }}</div> <div class="name">Country Name</div> <div class="code"><pre>{{ address.country.name }}</div> <div class="out">{{ address.country.name }}</div> <div class="name">Address code</div> <div class="code"><pre>{{ address.code }}</div> <div class="out">{{ address.code }}</div> </div>