#StackBounty: #magento2 #magento-2.1 #checkout #shipping-address #billing-address how to reorder (switch) billing address before shippi…

Bounty: 100

on the onepage checkout I need to reorder the billing address before the shipping address.
in fact the logic should be the other way around than it is now.
if the shipping address differs from the billing address you should be able to edit it.
now you can edit the billing address if it differs from the shipping address.
also the billing address should appear on the same “page” as the shipping address. currently step 1 in the magento checkout steps.

how would I do this? maybe there is a plugin for this but I couldn’t find one yet.

I attached a screenshot of a german shop doing it like this:

enter image description here

I found the .html template file for the billing form and it seems this is the place where it ends up in the checkout_index_index.xml:

<item name="billing-step" xsi:type="array">
    <item name="component" xsi:type="string">uiComponent</item>
    <item name="sortOrder" xsi:type="string">2</item>
    <item name="children" xsi:type="array">
        <item name="payment" xsi:type="array">
            <item name="component" xsi:type="string">Magento_Checkout/js/view/payment</item>
            <item name="config" xsi:type="array">
                <item name="title" xsi:type="string" translate="true">Payment</item>
            </item>
            <item name="children" xsi:type="array">
                <!-- ... -->
                <!-- merge your payment methods here -->
                <item name="afterMethods" xsi:type="array">
                    <item name="component" xsi:type="string">uiComponent</item>
                    <item name="displayArea" xsi:type="string">afterMethods</item>
                    <item name="children" xsi:type="array">
                        <!-- merge additional data after payment methods here -->

<!-- I think here the billing form ends up -->

                    </item>
                </item>
            </item>
        </item>
    </item>
</item>

But it’s not specifically placed here and I can’t seem to find another place where it is injected to that place.


Get this bounty!!!