Magento 2 – Create system configuration – system.xml

In this blog post we will see how to create System Configuration for your module in Magento 2

System configuration in Magento 2 is very similar to Magento 1

System configuration is divided into different parts; tab, section, group and field which is described in magento1 blog. This same concepts are used in Magento2 as well.

1. Create VendorName/ModuleName/etc/adminhtml/system.xml file

with content

2. Set default values for these configuration item

Create file: VendorName/ModuleName/etc/config.xml

3. Create ACL file

Create file: VendorName/ModuleName/etc/acl.xml

Now when you open Magento admin, you see the “Test” tab and sections.
You might get an error 404 Not Found first time, just logout and login again to fix this.

That’s how to create store configuration in Magento 2. See you in other tutorials.

 

Leave a Reply

Your email address will not be published.