Magento 1.9 – How to Create Custom Module from Scratch

magento-1.9

How to create custom module from scratch in Magento 1.9

which is he directory structure and which are the files i need to create for creating the simple basic custom module.

Best Answer

You should work with app/code/local directory and there build your module.

Create: app/code/local/Vendor_Name/Module_Name/etc/config.xml with

<?xml version="1.0"?>
<config>
<modules>
<Vendor_Name_Module_Name>
<version>0.0.1</version>
</Vendor_Name_Module_Name>
</modules>
</config>

and create app/etc/modules/_.xml with

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

With this 2 files you should be able to see your module in Magento Admin > System Configuration > Advanced > Advanced

Related Topic