Mage Check Facebook icon Mage Check Linkedin icon

Magento How to create an extension module

$ To show you how to create a Magento extension, we are going to build a Tutorial module, which is going to have only the sample structure.

$ Let's follow the steps below!

Step 1: Declare Extension/Module

Magento 1 (2007 - 2014)

File path: app/etc/modules/MageCheck_Tutorial.xml


        
    

Magento 2 Open Source (2014 -)

File path: app/code/MageCheck/Tutorial/registration.php


        
    

Step 2: Create Configuration Files

Magento 1 (2007 - 2014)

File path: app/code/local/MageCheck/Tutorial/etc/config.xml


        
    

Magento 2 Open Source (2014 -)

File path: app/code/MageCheck/Tutorial/etc/module.xml


        
    

Step 3: Enable Extension/Module

Magento 1 (2007 - 2014)

In order to enable the module we need to clear the cache, for this we have 2 options:

1. Login into the admin panel and go in the menu into System > Cache Management

2. You can install n98-magerun.phar and run:

php n98-magerun.phar cache:clean

We can see if the module is enabled by going to: System > Configuration > Advanced > Advanced > Disable Modules Output

Magento 2 Open Source (2014 -)

Enabling the module needs to be done using a bin/magento command:

bin/magento module:enable MageCheck_Tutorial

Test to verify module status if it's "enabled" or "disabled":

bin/magento module:status MageCheck_Tutorial

Step 4: Git Sources

Magento 1 (2007 - 2014)

URL: https://bitbucket.org/magecheck/magento1945/src/create-module/

git clone -b create-module git@bitbucket.org:magecheck/magento1945.git

Magento 2 Open Source (2014 -)

URL:

Will be added further