Magento 2.3: Checkout page displays only `loading image` after checkout_index_index.xml was overridden in the custom theme

magento.stackexchange https://magento.stackexchange.com/questions/312853

Question

The checkout page now display loading image forever after I have overridden the checkout_index_index.xml in the custom theme to remove faxfield from the checkout page. Below is the screenshot showing the customized xml. Could you please point out the issue that might be causing endless loading image. Thank you.

enter image description here

Was it helpful?

Solution

There are two steps to remove the fax field in the checkout page

Step-1

Go to admin path

Stores > Configuration > Customers > Customer Configuration > Name and
> Address Options > Show Fax > No

enter image description here

Step-2 You need to override checkout_index_index.xml.

app/design/frontend/VENDOR/THEME/Magento_Checkout/layout/checkout_index_index.xml

And below Code

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="shippingAddress" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <!-- The name of the form the field belongs to -->
                                                        <item name="shipping-address-fieldset" xsi:type="array">
                                                            <item name="children" xsi:type="array">
                                                                <!--Remove fields-->
                                                                <item name="fax" xsi:type="array">
                                                                    <item name="visible" xsi:type="boolean">false</item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Run CLI Commands

 bin/magento cache:clean
 bin/magento cache:flush
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top