cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove Company field from checkout process in Magento 2?

How to remove Company field from checkout process in Magento 2?

How to remove Company field from checkout process in Magento 2? Is there any way to remove this field via layout or template?

2 REPLIES 2

Re: How to remove Company field from checkout process in Magento 2?

You need to override checkout_index_index.xml.

(depend your structure )

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

Sample:

 

<?xml version="1.0"?>
<!--
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="mobile.top.search" remove="true"/>
<referenceContainer name="checkout.header.wrapper">
<container name="checkout.header.wrapper.container" htmlTag="div" htmlClass="header-wrapper-container" />
</referenceContainer>
<move element="logo" destination="checkout.header.wrapper.container"/>
<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">
<item name="company" xsi:type="array">
<item name="visible" xsi:type="boolean">true</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</body>
</page>

 

Re: How to remove Company field from checkout process in Magento 2?

There is no need for coding,simply go to

Stores > Configuration > Cutomers > Customer Configuration

then in Name and Address Options You set Show Company to No

 

Note: I'm in magento 2.2.2