here my first step to understanding magento 2 module development by create hello world extension, haha:
- create file app/code/Ansyori/HelloWorld/etc/module.xml
- here module.xml file content
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Ansyori_HelloWorld" setup_version="0.0.0"> </module> </config>
- then create module registration file, app/code/Ansyori/HelloWorld/registration.php
-
<?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Ansyori_HelloWorld', __DIR__ ); ?>
- run follwing command use shell/command promp
- “php D:\xampp\htdocs\magento21\bin\magento setup:upgrade”
- or “D:\xampp\php\php D:\xampp\htdocs\magento21\bin\magento setup:upgrade”
- if still not work, go to app\etc\config.php, edit the file
-
<?php return array ( 'modules' => array ( 'Ansyori_HelloWorld' => 1, 'Magento_Store' => 1, .............
- clear magento cache, at System->Cache Managements->Flush Magento Cache
- you will see your new module listed at Store->Setting->Configuration->Advanced->Advanced
Comments are closed.