details.html 1.85 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<div if="isAddressDetailsVisible() && currentBillingAddress()" class="billing-address-details">
    <text args="currentBillingAddress().prefix"/> <text args="currentBillingAddress().firstname"/> <text args="currentBillingAddress().middlename"/>
    <text args="currentBillingAddress().lastname"/> <text args="currentBillingAddress().suffix"/><br/>
    <text args="_.values(currentBillingAddress().street).join(', ')"/><br/>
    <text args="currentBillingAddress().city "/>, <span text="currentBillingAddress().region"></span> <text args="currentBillingAddress().postcode"/><br/>
    <text args="getCountryName(currentBillingAddress().countryId)"/><br/>
    <a if="currentBillingAddress().telephone" attr="'href': 'tel:' + currentBillingAddress().telephone" text="currentBillingAddress().telephone"></a><br/>

    <each args="data: currentBillingAddress().customAttributes, as: 'element'">
        <each args="data: Object.keys(element), as: 'attribute'">
            <if args="typeof element[attribute] === 'object'">
                <if args="element[attribute].label">
                    <text args="element[attribute].label"/>
                </if>
                <ifnot args="element[attribute].label">
                    <if args="element[attribute].value">
                        <text args="element[attribute].value"/>
                    </if>
                </ifnot>
            </if>
            <if args="typeof element[attribute] === 'string'">
                <text args="element[attribute]"/>
            </if><br/>
        </each>
    </each>

    <button visible="!isAddressSameAsShipping()"
            type="button"
            class="action action-edit-address"
            click="editAddress">
        <span translate="'Edit'"></span>
    </button>
</div>