The checkout page now display loading image forever after I have overridden the checkout_index_index.xml in the custom theme to remove fax
field 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.
-
fax field is default or you customised field on checkout page?– Chandresh ChauhanCommented May 15, 2020 at 10:06
-
do you have any error at console?– Yasir LatifCommented May 15, 2020 at 10:39
-
@ Yasir Latif , no errors.– CodeForGoodCommented 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?– CodeForGoodCommented May 15, 2020 at 12:05
Add a comment
|
1 Answer
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
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
-
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
-
-
-
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