1

Reading articles relating to calling store name and other admin fields, this post specifically.

I'm creating a module (my first for Magento 2) for my client but want to add an additional field (company registration number) and have it appear in the General > Store Information tab under the VAT number, is this possible? I currently have other fields appear in my own system tab.

1 Answer 1

2

Try following way


<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
            <group id="store_information" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
                <field id="merchant_vat_number1" translate="label" type="text" sortOrder="62" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>VAT Number1</label>
                    <can_be_empty>1</can_be_empty>
                </field>
            </group>
        </section>
    </system>
</config>

If your module has system.xml then you need to add <section> only otherwise whole text inside system.xml

0

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.