 It's not showing slideshow, no. Yeah, same procedure as last time. Yeah, yeah, yeah, yeah. We are Microsoft now, it should work. It's linux now. It's linux now. Yeah. Now we'll move from it. And we'll continue with this. Okay. So, so I'm here to present the, to get familiar with all of you for Magento 2, how to create the modules in Magento 2. Like whenever we use Magento, it's a basic functionality with Magento already. But at some point of time we have to modify many things. And we have to create too many custom modules. So today I'm here to just share my knowledge how to create the custom modules in Magento 2. Before that, so the agenda is here is first we can have a quick overview of how we created a module in Magento 1. And after that, I will share how to, what is the difference file structure between the Magento 1 and the Magento 2. And after that, there's a how to create a simple module in Magento 2. It's, it will cover the backend, in the backend, we can modify in the front end, we can modify. And after that, I will give you a quick demo for this how to create. So let's start with the first one. So here you can see in Magento 1, we have very scattered file structure. Like whenever I have to create any new module, I can, I have to write it in community or either in the local. It's the path will be app code community. It's a community module. If community is developed and if I will develop it locally, then it will be in under local. So in the community, we have different folders like this way. So in community, we have the name of the vendor. It's BLVG under which we have the module name like which what module represent like it's here Facebook free. So this is a module name. And under this, we have different subfolders like config block controllers and different. It's MVC. So after this, if I have to define some file, which will show in front end, then I have to go again to the design directory. Under design, I have to have some particular levels of directly like a front end base default on the layout and other templates. I have to define. And if I first see it's in ETC folder in ETC, my file where I have to start my module. So this is the basic file one of the main measure file. And if I write if I need to write the JavaScript or some CSS, then I have to go to the skin folder. So you can see here is a many different folders like app design and the skin the ETC. So these are very scattered. It will make you problem when we have many large number of modules like I have 20 to 30 modules and I'm searching for some file like where this code is written. Then I have to first go to the code community. Under this, I have to search for the ETC file, ETC folder under in the config file under config file. I have to find out where is the layout file written. Then I go to the layout file and under layout file, I choose I need to search where is the template file written. Then I have to come back and go to the design folder in the template. I can find my file. So it's a very long processor in the margin to one. So now what is the difference between the magic into one and magic into two file structure. First, you can see the folder like in magic into one, the folder is app code, including three subfolders like co community and local core will be the magic into score folder co modules. Community will be the developed by the community or the extension provider and the local will be designed by our cell. In the in magic into two, you can see only one. It's a app app code or you can see in the vendor directory create a module name instead of the app code. There is no level of hierarchy like community core and local. It's only a one app folder under app. You can go to the code under code. You have to write your vendors name and under vendor name. It will be the same like the module name for which it is like we have just. So in the previous slide, it was BLVG here under BLVG. It's Facebook free. So here you only write app code under BLVG and under Facebook free. I will give you the demo so that you can get more clear. And after that the module declaration, this is the file dot XML, which is in magic into one. It's under app, etc and modules. So under app, etc module, we have different file like VES underscore brand dot XML. But when you go to the magic into two, it's a module dot XML. And after that, the layout and the template files are saved in different folder like which I so said like a design front end admin HTML if it is. So in here in magic into 2.0, it's a layout and the template files are saved in new folder, which is view under view. Each folder modules. So everything is under same module in magic into two. After that the skin if I have to write JS and CSS, I need to go to the skin and under skin we have different folder for JS and CSS. But in magic into 2.0, we have this also in the same folder in the quotes. So the path will be the vendors name module name and a view in the front end admin HTML web CSS for CSS and JS for JS. So this is the basic difference of the file structure. And after that, yeah. So this is the file structure for magic into 2.0. Here you can see app code. This is my company's name and extension is the module name. And in magic into one, it was app code and under code. We have three different folder like core community and local here only one folder. It's vendor name. You can create many modules under vendor name. So what these are? Can show you the blocks. It's a storage file that ensure interaction between the patterns. It's like a PHP file, which we show on the front end, which is help us to show the content in the front end. And after this, this is a controller here. You can just see that this is the capital C controller here in magic into 1.0. We have a small C small C controller and capital C both. But here, if you write any controller, it will be in capital C controller under controller. Its file structure is different as in magic into 1.0. We have controller folder small C with a small C. And in controller folder, we have a controller file and under controller, we have different actions. But in magic into 2.0, you will see a controller folder under controller folder. There will be another folder for controller name. Like I have a hello world controller. Then hello is a controller's folder name again. And I have to define an action. It will be word folder. I can show you the demo. And in ETC, we have a configuration file, which is same like in the magic into 1.0. In ETC, in magic into 1.0, we have config files and system dot XML and admin HTML dot XML. In magic into 2.0, it will cover the module dot XML, you can see. And in the helper, it contains the same basic feature of the PHP helper. Help us to redefine any some piece of code which we can use in controller blocks. And in the model, it contains the response for the connection between the database. Like it will execute, it will get the data or load the data from the database. And after that, the setup script. It's a same creating table, modifying table, updating tables into view. Here is a view folder which contains the front end show. Like it will contain the PHP HTML files. Front end and the back end files, which we define in the design folder. It's now here view. So here we can start like how to create a custom module in magic into 2.0. So first, like here I am explaining you is RhinoSys is my company's name. And the custom is my module, custom module. So here you can see this is a piece of code which is predefined. It is written in magic into like magic into framework module etc, module dot xsd. You can go and see the code here. And after this, this is the piece of the code which we have to return to define our module. It's module name, which is it this module dot XML is work same as our file in under etc. Like module name under company name underscore module name dot XML where we define our module name. And now in here in magic into 2.0, we have to define in module dot XML. So it is a version also 1.0.1, which is used to create or update the setup scripts. After this, I have to create one more file here, which is registration dot PHP to register my module. Otherwise, my module will not work if I will not define here. So this is the name actually my module name. This is the same piece of code which we have to write in register dot PHP just and after that it's roots. We have to define the roots in magic into 1.0. We define the roots in the config dot XML for the front end and for the back end. But in magic into 2.0, it's root dot XML under app etc folder and roots dot XML. So here you can see the root ID standard in magic into 1.0. It's same it's it's standard for the front end admin for the admin back end and CMS for the CMS and the one is a default. These four types of roots doctors we have. So in root ID, it's custom root ID and the root name we generally prefer in magic into it will be same. Like my module name and the under this the module name which we have to define the analysis underscore custom. So this file is basically for rooting access like in the URL. We have to define this after this when you go to the controller which I just said like you have to create the controller name as you have to create a link like custom index and index. So for this first you have to go to this folder like ranosys underscore controller capital C with capital C again. And under this the index index is my controller controllers name and under controller there will be a file index dot PHP, which is my actions name. So here if you have five action for one controller, you have to create five files different files in magic into 1.0. You can define all actions in one controller. So here is the index name of the controller folder and the index name of the action file, which is index dot PHP. After this, we have to define the layout file, which is layout file will be the XML file in which we define the blocks and the phtml file path, which is same as a magic into 2.0. The coding is same under this file, but the file location is now changed. It will be under views view and a front end layout. It's the same structure, but under the same directory, you can see app code, ranosys and custom and the custom you have to create the view folder. So block class is like this in this magic into 2.0. In the previous one 1.0, we just write ranosys underscore custom underscore block underscore hello world. But here it's slash separated. Now the name, it will be the name of the block, which you can give and you can call by this name in the phtml file. This is the template name. This is the format is changed here differently. Like you have to specify your vendor's name and module name colon, double colon and then it's the name of the phtml file, which we are going to define in templates. After this, let's create a block for our module. So this is the block file. It's the same as a magic into 1.0. The coding is same, but the defining method of the class is different here. You can see here in magic into 1.0, we have to define like ranosys underscore custom underscore block underscore custom. But in magic into 2.0, you have to use a name space like ranosys custom block and under block, which file it is. It's a custom dot php. So the class name will only be the custom, which is extending the different different files here in magic into 2.0. And after that, it's my phtml file here. I wrote welcome to magic into. We have to show on front end on the homepage. So steps to create custom module. So here activate active your module extension. So you can directly by writing here to activate the module. This is a different feature actually. This is a different way in this. You have to go to the config dot XML and had your ranosys underscore custom one value to activate this module. And after this module, you will not even able to see in the admin until unless you will run this command, the magic into setup upgrade. After you run this command, you can see your module name will be here in the last or in the end. You can see and after that your module will show in the backend. Otherwise it will not show. So here we can I can show you the quick demo. So is my magic into 2 under app code. I just wrote the ranosys my folder name, my company's name and it's my module name. And you can see the block controller, etc folder model view, which I just talked view is containing the layout file in the phtml files. And the registration dot php is a necessary file to register my module in magic into 2. So here you can see the ACLs. You have to define the ACL if you are going to work in the with the system configurations in magic into backend. If you want to add the new fields, here's the module module dot XML to define my module. It's front end here you can you have to show specify the routers and admin HTML system dot XML. So it's a folder difference here. Like in magic into 1.0 we have under etc. We have all the files admin HTML system dot XML and the config dot XML. But here if we need to define the routes routes file here and system dot XML will be defined in admin HTML. So it's here. Yeah, it's like I have to run the controller name like my URL will be. I can show you my URL will be this. Renosys hello world. So here the Renosys is my front end name. Front name, which I need to define the routers and hello is the controllers name and world is the action name. You can see the structure here like in the controllers kept with capital C. You can go hello. You can go world. So this is a structure. If I need to define five to six, five to six action, then I need to define different files here. So under world, I can show you. Yeah, you can you can also see now the structure or writing the code is now different in magic into 2. Here you have to define the name space in the first line in every block model controllers. Yeah, you can see the Renosys custom controller and hello that till the controllers name you have to write the path. And after this, the class will be my action name only world, which is just extending the same magic into framework action action. So yeah, it's the coding under the function is same like in controllers, there will be a default action name is execute which will execute whenever you hit the you hit the URL, you hit the controllers URL in magic into 1.0, it was index index action was a default one, but in magic into 2, it's execute function which will execute automatically. So you have to write everything on execute. That's why they have different action files in each action you have an execute. Otherwise in magic into 1.0, we have an action name different action name in one controller file. And through action name, we can access the URL, but here we for action name, we have different files under different files. We have execute function which will automatically execute with the ways little bit same and little bit different. You can say there we use dollar this load layout dollars is render layout, but in magic into 2.0, you have to use dollar this underscore view load layout and render layout. So this is the basic file structure you can see. So everything I have is under one folder. I don't have to go anywhere else. Like I have designed some custom module. I can see every files from front end, back end, JS, CSS, everything will be under this folder. So it's very easy to manageable. I can show you also like I have developed this module already like it's my custom configuration when I select here. I have created a configuration system configuration module. You can change it's a bit slow. So till then we can see the front end part like it's my home page. You can see it's a home page which don't have any customization part. So whenever we create front end module, we have to show the message here like instead of the home page, I want to change my message. So I created that module and this is a company name front end name and hello is a controller name and world is action name. So when I hit this, you can see the message change. So I just show you from where this message comes. It's under template custom dot phtml. It's here. Welcome to magic into 2.0. So this message is come from phtml. I call this phtml under controllers through the blocks in block. We have defined the layouts and different things. So this is the custom module here. You can show anything like for the front end part and for the back end part. I have to log in again. So front end part was defined in the roots dot XML to access the URL and the back end part for the configuration part. We have to define same in the same file like system dot XML. Here the back end, they have also modified very much. So here you can see ranos customization configuration. Yeah, you can see all types of like it's drop down type, it's text type, text area type. You can upload any, any file or any choose any file any. So the code is where you can select any file from the desktop. It will be loaded. So, yeah, this is the, this is the demo. So any queries or any questions I can ask. Action, do you create different file? Yeah, for different file because they have created an execute, execute function. Only execute? Yeah, only execute. I'm like, hello, where? Yeah. Every see something message? No, no, actually the file structure is just like that. You have to create a file for the action. For every action? Yeah. For every action under the controllers folder, you have to define a file. So with a single module, it will be 10 functions, it will be 10 different files? Yeah, it will be 10 different files because it's execution is the main method they can automatically call. And it's, yeah, it's way changed, but it's now very manageable. Like everything, it's in the same place. You can find everything. And also, yeah, also it's a very lightweighted than the Magento 1.0, like in Magento 2.0, whenever we define different modules, it will get all the configurations.xml, config.xml and create a one single XML file. So every time it will load, like I have 20, then it will access all the 20 files, create it in one files and then load. That's why it's taking time, more time. But in Magento 2.0, it's every module is there on separate files. Whenever you hit that module, then only it will load. Yeah, that's why they have created one module, like in one folder. Whenever you access RhinoSys, it will call all the file of the RhinoSys only. Like, but in the Magento 1.0, we have a scattered, every file is scattered. So they have to combine all those configuration.xml in the same big file. In that file, they can have the linking of the files actually. But in Magento 2.0, you can see the different, all the files are in the same place. So whenever you hit RhinoSys, you only load the RhinoSys files. That's why it's faster actually. Okay. So I think, okay. Thank you. Thank you.