customers/addresses

The customers/addresses template renders the customer addresses page, which allows customers to view and manage their current addresses, as well as add new ones.

The customer object

You can access the Liquid customer object to display the customer account details.

Standard form inputs

Inside forms for adding or editing an address, there are standard form inputs for each address detail. The table below shows each, with their associated type and name attributes.

Input type name
First name text address[first_name]
Last name text address[last_name]
Company text address[company]
Address 1 text address[address1]
Address 2 text address[address2]
City text address[city]
Country select address[country]
Province select address[province]
ZIP/Postal Code text address[zip]
Phone Number tel address[phone]

Add a new address

You can allow customers to add a new address with the Liquid form tag and accompanying 'customer_address', customer.new_address parameters:

Inside the form, you need to include the standard form inputs for capturing the various address details.

Edit an existing address

With each existing address, you should include a form to edit it. You can add this form with the Liquid form tag and accompanying 'customer_address', address parameters:

Inside the form, you need to include the standard form inputs for capturing the various address details.

Delete an address

With each existing address, you should include the option to delete it. You can add this option by including the following form: