4

I have to remove fax input from billing-address in checkout process. ( when you check out "My billing and shipping address are the same" and the form appears )

Found that is generated here :

Magento > Checkout > view > frontend > web > template > billing-address.html

<!-- ko template: 'Magento_Checkout/billing-address/form' --><!-- /ko -->

No idea where those inputs are generated, i only want to remove fax from there, allready tried to remove fax from checkout_index_index.xml layout with no luck. I dont understand how "ko" works or where i can change this.

enter image description here

3

You can remove Fax using by below code.

Add this code to in your theme checkout_index_index.xml file inside body tag.

app/design/frontend/Vendor/Theme/Magento_Checkout/layout/checkout_index_index.xml

<referenceContainer name="content">
            <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">
                                                            <item name="shipping-address-fieldset" xsi:type="array">
                                                                <item name="children" xsi:type="array">
                                                                    <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>
        </referenceContainer>

Clear cache and check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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