Posts

Showing posts with the label module in magento

Creating a new module in magento 2

In magento 2 all modules reside in the folder app/code directory, previously in magento1 there was the concept of local/ community/ core/ folders but that has been removed now. For creating modules in magento 2 we need at least these 3 files in our module in this directory arrangement. Step1 Module names in magento 2 are divided into two part “VendorName_ModuleName” e.g Magento_Contact, Magento_Catalog or Trieffects_Test first part is the vendor and second part is the actual module. Let’s take our module name to be “Trieffects_Hello”. First we need to make the folders app/code/Trieffects/Hello Step2 – module.xml Next we need to add the module.xml file app/code/Trieffects/Hello/etc/module.xml with following contents <?xml version="1.0"?>        <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">         <module name="Trie