Custom Magento Module tutorial and ModuleCreator

Creating custom Magento module is little bit tricky and tough, if you are going with manual approach. Because creating a simple Magento module requires lots of coding and configuration. In some scenario if you will type the XML configuration in the wrong case then also it will not work. This is the main reason developer hegitate to work on magento and sometime they believe that the Magento is very complex. But if you will learn the internal archticture of the magento and you will have some template or sample module to start your work, you will really enjoy developing Magento module. In my custom magento module tutorial  I will demonstrate how to create magento module and using a template module of the Magento(official name ModuleCreator) and also will demonstrate the complete structure so that creation of the Magento module will be easier for you.

Step -1 Create Module Using Magento ModuleCreator

Magento Module Creator is a Magento module which can create a skeleton(blank) module for you. By creating the module using module creator your work will be minimize by 50%. After creation of the module using module creator you only need to understand the flow of the Magento and little bit of the MVC framework to finish your job. You can download ModuleCreator from Magento Connect website(Thanks to Netz98). But the module supported for version 1.3 only and the current version of Magento is 1.7 on which ModuleCreator is not supported, very sad new. But no need to worry I have made some modification in the existing ModuleCreator and it is working absolutely fine. You can download the modified version of the moduleCreator by clicking here.

If you have installed the module using magento connect then  only you need to open the URL [yourmagentowebsite]/moduleCreator. If you have downloaded moduleCreator from my website unzip the file and place unzip folder in your magento website installation and open URL [yourmagentowebsite]/moduleCreator. In my case it is . Once you will enter this URL you will find a login page. Following is the snapshot.Magento ModuleCreator login

Please enter your Magento login username and password to enter into moduleCreator. Once you will enter the correct username and password you will get the interface where you need to enter information to create your own new custom module. Following is the screenshot of the page where you need to enter information to create your own custom module.

Magento Module Creator Post login snapIf you are new for Magento Let me explain that all the input required by moduleCreator.
Namespace: In magento module creation namespace is the container above the module. I will explain this in latter part of this tutorial. Type your company name here like techflirt.
Module: This is the name of your module.
Magento Root Directory: It is the root directory of the magento. It will be auto populated by the module. If not then please enter the correct path of your Magento installation root.
Leave Design field empty.

Click on Create button and you will see the location of your module and module related file. Below is the snapshot.Module Creation Final StepCongratulation!!! You new module has been created. You can see the list of the location of the file created by modulecreator for you. You can login into your magento admin panel and see that a toolbar by your module has been created like below.

Magnto Admin Menu

Let us move to step 2 where  we will explore on how to create a new functionality in the magento module and the structure of magento module.

Step – 2 Customizing the your new Module(Adding New feature)

In step 1 you have created the blank module. Now it is time extend the feature of the magento using the blank skeleton. you can go to YourMagntoInstallation/app/code/local/techflirt/helloworld directory and see all basic required directory and files has been created. Also it has created a table in the sample database. If you have some basic knowlege of the magento module module structure you can easily go on next step. If you have no idea about the magento module structure please read my next posting on Magento Module Structure.

Have a nice coding ahead.


  1. Drifo says

    wow your modification in module creator is working and i can create module eaisly.
    Please let me know what change you made in the code.

  2. Robin says

    Best help for how to customize magento and if custom module not working in magento 1.7. Also if you are looking for how to install module creator 1.3 in magento 1.7. Also for magento download module creator and magento module creator for 1.7

  3. magento modules says

    Thanks you for sharing this tutorial. I’m looking for a way to build my own magento modules and found this article. Great help!

  4. Rajveer Singh says

    Nice tutorial….
    I got module crearor from magento connect but it has some bugs in compatibility with magento 1.7. I downloaded it from here and replaced the file and it is working fine for me.

    Thank for helping.

  5. Divyanshi says

    Great tutorial.Good Job. just want to update for version 1.9 put layout files in frontend/base/default instead of frontend/default/default.

  6. Omar says

    how can i create a separate module files not installed right way if i empty the
    Magento Root Directory then it gave error Fatal error: Uncaught exception ‘Exception’ with message ‘Warning: unlink(var/cache/) [function.unlink]:

Leave a Reply