Address Data In Customer Account Fields

Overview

Customer Account Fields has two types of address fields, depending on your needs.

2019-06-25_1551.png

Customer Default Address

This option connects to the customer's default address in your store. It does not create a new data point. It simply allows you to configure your form to connect with the default address.

Generic Address

This option allows you to create an additional address field, separate from the default address. 

Accessing the Data in Your Templates

Data is accessed differently depending on the storage option you've selected in the settings.

Customer Default Address

This data can be accessed using Shopify's standard liquid objects. Refer to Shopify's documentation when using this storage option. 

Generic Address

When using this storage option, the data is stored in a metafield on the customer object as JSON.

All available sub-items are detailed in Shopify's documentation.

For example, if your address field had a machine name of "add", all address data would be stored in customer.metafields.cf_app.add

Tip: Machine names are found on the settings page for the address field in the app.

To print a value from that object, such as address1, you'd use the following syntax:  customer.metafields.cf_app.add.address1

2019-06-25_1630.png