I want to override Shipping address field At present, the shipping address, Company Name is a required field


Occurs in the checkout page.


If this is still not working and you are using magento 2 enterprise , then you can also try following way as well :

Create file : app/code/Vendor/ModuleName/etc/adminhtml/system.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
        <section id="customer" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
            <group id="company_config" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Show Company Configuration</label>       
                <field id="company" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Show Company</label>

But I would recommend first debug your code customization , this procedure generally used for customer EAV attribute for address options .

| improve this answer | |
  • I Used SQL UPDATE eav_attribute SET is_required = '0' WHERE eav_attribute.attribute_id = 27; to get the solution – Sam Apr 24 '18 at 10:39
  • I think this code will do the same that's why suggested but it is not recommended to do any change on EAV tables directly from DB – Shashank Gupta Apr 24 '18 at 10:45

You can try following:

Admin Login ->Store->configuration-> Customers->Customer Configuration -> Expand Name and Address option section -> Show Company (Optional).

Hope it'll help you.

| improve this answer | |
  • screencast.com/t/udgF75EDlCq Expanded Name & Adress option not showing up option @shashank – Sam Apr 23 '18 at 10:20
  • You are using community or enterprise ? – Shashank Gupta Apr 23 '18 at 11:52
  • Enterprise Edition – Sam Apr 23 '18 at 13:02
  • I think there is some break in the code because this option is available in following location by default without any customization. try to disable custom modules and check first. – Shashank Gupta Apr 23 '18 at 13:11

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.