Magento 1. Creating a module. Part 2. Create configuration files for our module

May 22, 2017 16 Yehor Rykhnov

In this article, we'll look at the minimal settings in the configuration files of our module.

Create a configuration file for the module app/etc/modules/My_Articles.xml. With code:

<?xml version="1.0" ?>
<config>
   <modules>
       <My_Articles>
           <active>true</active>
           <codePool>local</codePool>
       </My_Articles>
   </modules>
</config>

At this stage, Magento already knows about our module.

The active tag indicates whether the our module is active or not. Also this module can be found in the admin panel System -> Configuration -> Advanced

The codePool tag indicates that the development is done by a third-party developer (not Magento and not the Magento community)

Create folders:

  • app/code/local/My
  • app/code/local/My/Articles
  • app/code/local/My/Articles/etc

Create the file: app/code/local/My/Articles/etc/config.xml

Add code:

<?xml version="1.0" ?>
<config>
   <modules>
       <My_Articles>
           <version>1.0.0</version>
       </My_Articles>
   </modules>
</config>

This completes the configuration creation.

List of articles on the current topic: Magento и magento start.