{% block page_checkout_confirm_address_inner %}
{# @var page \Shopware\Storefront\Page\Checkout\Confirm\CheckoutConfirmPage #}
{% if page.order %}
{% set order = page.order %}
{% set deliveries = order.deliveries.elements %}
{% set billingAddress = order.billingAddress %}
{% if deliveries|length > 0 and order.billingAddress.id != deliveries|first.shippingOrderAddressId %}
{% set shippingAddress = deliveries|first.shippingOrderAddress %}
{% else %}
{% set shippingAddress = billingAddress %}
{% endif %}
{% else %}
{% set billingAddress = context.customer.activeBillingAddress %}
{% set shippingAddress = context.customer.activeShippingAddress %}
{% endif %}
{% block page_checkout_confirm_address %}
<div class="row js-confirm-overview-addresses">
{# @deprecated tag:v6.5.0 - Billing address will be displayed after the shipping address. #}
{% block page_checkout_confirm_address_billing %}
<div class="col-sm-6 card-col confirm-billing-address">
<div class="card checkout-card">
<div class="card-body">
{% block page_checkout_confirm_address_billing_title %}
<div class="card-title">
{{ "checkout.billingAddressHeader"|trans|sw_sanitize }}
</div>
{% endblock %}
{% block page_checkout_confirm_address_billing_data %}
<div class="confirm-address-billing">
{% sw_include '@Storefront/storefront/component/address/address.html.twig' with {
'address': billingAddress
} %}
</div>
{% endblock %}
{% block page_checkout_confirm_address_billing_actions %}
<div class="card-actions">
{# @deprecated tag:v6.5.0 - Option addressEditorOptions.csrfToken will be removed. #}
{% set addressEditorOptions = {
changeBilling: true,
addressId: billingAddress.id,
csrfToken: sw_csrf("frontend.account.addressbook", {"mode": "token"})
} %}
{% block page_checkout_confirm_address_billing_actions_link %}
<a href="{{ path('frontend.account.address.edit.page', {'addressId': billingAddress.id}) }}"
title="{{ "account.overviewChangeBilling"|trans|striptags }}"
class="btn btn-light"
data-address-editor="true"
data-address-editor-options='{{ addressEditorOptions|json_encode }}'>
{{ "account.overviewChangeBilling"|trans|sw_sanitize }}
</a>
{% endblock %}
</div>
{% endblock %}
</div>
</div>
</div>
{% endblock %}
{# @deprecated tag:v6.5.0 - Shipping address will be displayed before the billing address. #}
{% block page_checkout_confirm_address_shipping %}
{% if page.cart is defined %}
{% set lineItems = page.cart.lineItems %}
{% endif %}
{% if page.order is defined %}
{% set lineItems = page.order.lineItems %}
{% endif %}
{% if not page.isHideShippingAddress() %}
<div class="col-sm-6 card-col confirm-shipping-address">
<div class="card checkout-card">
<div class="card-body">
{% block page_checkout_confirm_address_shipping_title %}
<div class="card-title">
{{ "checkout.shippingAddressHeader"|trans|sw_sanitize }}
</div>
{% endblock %}
{% block page_checkout_confirm_address_shipping_data %}
<div class="confirm-address-shipping">
{# @deprecated tag:v6.5.0 - "Address equals"-logic will be moved into billing address cart. #}
{% if billingAddress.id is same as(shippingAddress.id) %}
{# @deprecated tag:v6.5.0 - Block will be moved into billing address cart and renamed to `page_checkout_confirm_address_billing_data_equal` #}
{% block page_checkout_confirm_address_shipping_data_equal %}
<p>
{{ "checkout.addressEqualText"|trans|sw_sanitize }}
</p>
{% endblock %}
{% else %}
{% sw_include '@Storefront/storefront/component/address/address.html.twig' with {
'address': shippingAddress
} %}
{% endif %}
</div>
{% endblock %}
{% block page_checkout_confirm_address_shipping_actions %}
<div class="card-actions">
{# @deprecated tag:v6.5.0 - Option addressEditorOptions.csrfToken will be removed. #}
{% set addressEditorOptions = {
changeShipping: true,
addressId: shippingAddress.id,
csrfToken: sw_csrf("frontend.account.addressbook", {"mode": "token"})
} %}
{% block page_checkout_confirm_address_shipping_actions_link %}
<a href="{{ path('frontend.account.address.edit.page', {'addressId': shippingAddress.id}) }}"
title="{{ "account.overviewChangeShipping"|trans|striptags }}"
class="btn btn-light"
data-address-editor="true"
data-address-editor-options='{{ addressEditorOptions|json_encode }}'>
{{ "account.overviewChangeShipping"|trans|sw_sanitize }}
</a>
{% endblock %}
</div>
{% endblock %}
</div>
</div>
</div>
{% endif %}
{% endblock %}
</div>
{% endblock %}
{% endblock %}