Creating custom Magento module is bit tricky and tough if you are going with manual approach, because creating a simple Magento module need lots of coding and configuration. In some case if you 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 or sometime they believe that the Magento is very complex. But if you will lean the internal archticture of the magento and you will have some template module to start 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 to 50% only. 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 it you only 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 http://127.0.0.1/magento/moduleCreator . 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 interface. 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 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.

Tagged with:
 

13 Responses to Custom Magento Module tutorial and ModuleCreator

  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. [...] created your magento module. If you need help in creating magento module, you can read my post Create Magento Module using Module Creator. Now go to your module config.xml file which path would be like [...]

  5. 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.

  6. Keyur Shah says:

    Very Nice….Easily create module

  7. Thank you so much working fine

  8. Thanks for this! A very nifty tool to create my very own magento module! :D

  9. Shivam Mishra says:

    How can i download this module creator?

  10. 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.

Leave a Reply