Custom Labels for Address Fields Craft Commerce I need to be able to assign and output my own custom labels for the fields that are in the shipping/billing addresses during checkout in Craft Commerce. 

I've already done so on the form like so:

{% set countries = craft.commerce.countriesList %}
{% set states = craft.commerce.statesArray %}
{% set addressFields = {
    firstName: {
        label: 'First Name',
        required: 1,
    },
    lastName: {
        label: 'Last Name',
        required: 1,
    },
    address1: {
        label: 'Address',
        required: 1,
    },
    address2: {
        label: 'Address 2',
        required: 1,
    },
    city: {
        label: 'City',
        required: 1,
    },
    zipCode: {
        label: 'Zip Code',
        required: 1,
    },
    phone: {
        label: 'Phone',
        required: 1,
    },
    alternativePhone: {
        label: 'Alternative Phone',
        required: 1,
    },
} %}


{% set modelName = modelName is defined ? modelName : 'address' %}
{% set model = address is defined ? address : null %}

&lt;div class="addressBox {{ modelName }}"&gt;
    {% for key,options in addressFields %}
        &lt;div class="form-group col-md-6 {% if model and model.getErrors(key) %}has-error{% endif %}"&gt;
            &lt;label for="{{ modelName }}-{{ key }}"&gt;{{ options.label|t }}{{ options.required ? '*' : '' }}&lt;/label&gt;
            &lt;input type="text" id="{{ modelName }}-{{ key }}" class="u-full-width" name="{{ modelName }}[{{ key }}]"
                   value="{{ model ? model[key] : '' }}"&gt;
            {% if model and model.getErrors(key) %}
                &lt;span class="flash alert-warning"&gt;{{ model.getErrors(key)|join }}&lt;/span&gt;
            {% endif %}
        &lt;/div&gt;
    {% endfor %}


That works like a charm. I need to however also be able to output it with my custom labels as well. Here is my currently template area, i'm not sure how i can get my custom labels in here. Please advise:

{% for address in addresses %}
     {% for key,value in address.attributes() %}

          {% switch key %}

               {% case "id" %} {# ingore #}
               {% case "customerId" %} {# ingore #}

               {% default %}

               {% if value %}
                    &lt;li&gt;
                         &lt;h3 class="cart-product-details"&gt;{{ key|title }}:
                              &lt;span class="address-option" data-key="{{ key }}" data-value="{{ value }}"&gt;
                                   {{ key == 'countryId' ? address.countryText : (key == 'stateId' ? address.stateText : value) }}
                              &lt;/span&gt;
                        &lt;/h3&gt;
                    &lt;/li&gt;
               {% endif %}

          {% endswitch %}

     {% endfor %}
I think you're looking for the attribute function:

{% set field = attribute(addressFields, key) %}
{{ field.label }}