Create new module in Magento

Create new module in Magento – As you know, Magento has its own modules in /app/core/ directory. In this tutorial, we’re going to create a simple module which is necessary to use in other tutorials.

To make Magento recognize your module, you need to create at least following directories and files:

/app/etc/modules/YourVendor_YourModule.xml
/app/code/local/YourVendor/YourModule/etc/config.xml
/app/code/local/YourVendor/YourModule/Helper/Data.php

Let’s do it step by step:

1. Create file /app/etc/modules/YourVendor_YourModule.xml

with content:

This file make Magento know about your module name and code pool ( which is ‘YourVendor_YourModule’ and ‘local’)

2. Create your module config file /app/code/local/YourVendor/YourModule/etc/config.xml

with content:

3. Create your module helper file /app/code/local/YourVendor/YourModule/Helper/Data.php

with content:

After creating those files, go to your backend -> System -> Cache Management, refresh all cache types and flush cache storage also.
At last, to check if Magento recognized your module, go to your backend -> System -> Configuration -> Advanced -> Disable Modules Output, you can see your module with name ‘YourVendor_YourModule‘ has been listed.

If you got any problem when create new module in Magento, please leave a comment or contact us.