1.) The structure of a Magento module

In a magneto module there are 2 parties, the « code » and « templates ».

code determines the actions that the module will be able to achieve the interraction with the database etc … while templates are just the layout of the data sent by code.

Magento, the two parties will be placed at two different locations.

your « code » will be in

/app/code/local/monNameSpace/monNomDeModule/

while the « template » of the module will be in:

/app/design/frontend/monRepertoiredeTemplates/monTemplate (for the frontend)

And

/app/design/adminhtml/monRepertoiredeTemplates/monTemplate (for the backend)

The « code » of my template will contain the following elements:

Block : Where you go to the « controller » of your block

Controllers: the controllers of your module

Models: Performers of your module

Helper: of your helpers module

etc: the configuration of your module

sql: SQL query to execute to create your module during the instalation

Reminder on blocks:

Magento, a Block is a piece of your site that walks « alone », you can insert just anywhere. In fact, a block is a kind of « mini controller » that you can add anywhere on your site.

According to the page of your site, you can assign to different templates depending on the view you want to call it.

folder / app / code:

In this folder you will find three folders that contain:

Community: the plugins you have recovered (on magentoconnect for example).

Core: the default magento modules (especially not EDIT)

Local: the modules you have developed

Your duties until the next tutorial:

Try to browse the folders on your site to understand what I tell you. Open the files and try to understand.

Conclusion

the tutorial:

You have seen the structure of modules magento, if you do your homework you should understand a little better.

Does this sound a bit abstract for the moment? This is normal! That’s a lot of information at once.

In the next tutorial, we will begin the creation of our first module by creating the Controller.

Do not worry, trust me: we will create a complete module A to Z, step by step. We’ll take it easy and see everything that you seem a bit abstract in the first tutorial gradually become clear as we advance.

Now do your homework! Courrage good;)

If you have any questions please feel free to post a comment.