0

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

4
  • fax field is default or you customised field on checkout page? Commented May 15, 2020 at 10:06
  • do you have any error at console? Commented May 15, 2020 at 10:39
  • @ Yasir Latif , no errors. Commented May 15, 2020 at 10:52
  • @chandresh chauhan, fax field is always there. I am now trying to remove it from the checkout page. I now could remove it but the Place Order button doesn't after this change. Any idea why? Commented May 15, 2020 at 12:05

1 Answer 1

0

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
5
  • Hi, The first option offered by the Admin panel doesn't take any effect. Fax was default set to NO. Commented May 15, 2020 at 11:09
  • try 2nd steps....
    – Devidas
    Commented May 15, 2020 at 11:10
  • what happened?@CodeForGood
    – Devidas
    Commented May 15, 2020 at 11:56
  • None of the solutions could lead to a perfect situation as the final issue rests with Place Order button. Trying to see what is behind this. Commented May 15, 2020 at 12:01
  • I am accepting the second solution involving overrriding XML file because it removed the Fax text field in the first place. Commented May 15, 2020 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.