Creation of a Module in Magento

In this post we will explain the process of creation of a module in Magento. In order to create a module named as helloworld under demo namespace in the Magento we need to do the following steps:

Step-1: Create a directory structure for the new module under “app/code/local/Demo/Helloworld”. Our directory structure should look as follows:

Directory Structure for Module

Directory Structure for Module

Step-2: Create a config file names as config.xml at app/code/local/Demo/Helloworld/etc. This file will have the code in the form

Config File Template

Code Template for Config File

so our config file will have the code

Config File Code for HelloWorld

Config File Code for HelloWorld

 

Step-3: Create a file to activate a module at path “app/etc/modules/Demo_Helloworld.xml”. This file will have the code with the template as follows:

Code Template for Module Activation

Code Template for Module Activation

so our file will have to code as

Code for Activation HelloWorld

Code for Activation HelloWorld

Step-4: Verify that module has been successfully created and activated by clearing Magento cache. After clearing the cache go to Magento backend and then go to System->Configuration->Advanced. Expand “Disable Modules Output” and see Demo_Helloworld shows up.

Module Verification

Module Verification

Congratulation! we have successfully created the module in the Magento. In our next post we will discuss about Routes Creation and creating action controllers in Magento.

Rajat Jain
Rajat Jain

Latest posts by Rajat Jain (see all)

10 Comments
  1. casque beats
    • admin
  2. manteau parajumpers
    • admin
  3. pjs doudoune prix
    • admin
  4. web page
  5. homepage
  6. barbour jackor
    • admin

Leave a Reply