Before you jump in magento adventure, check that you already solid programming foundation.
The prerequisites to develop under magento are:
- Have already installed Magento.
- Know what the MVC pattern.
- Know the object-oriented PHP (PHP and of course ...)
- How the template system works in magento
You have the first 2 but do not have the 3rd go to:
the designer magento guide.
The structure of a magento modulus
In a module magento there are two parts, the "Code" and "templates".
Code determines the actions that the module will be able to achieve, interract with the database, do the calculations on prices etc ... while
templates are just files made that allow to format the data sent by the code.
In Magento, these two parts will be placed in two different locations.
The "code" will be in:
/app/code/local/myNamespace/monNomDeModule/
While Part "template" will be in:
/app/design/frontend/monRepertoiredeTemplates/monTemplate (for the frontend part)
And
/app/design/adminhtml/monRepertoiredeTemplates/monTemplate (for the backend part)
The "code" portion of my template will contain the following items:
Block the go or you put the party "controller" of your block
Controllers: the controllers of your module
Models: your module Performers
Helper: helpers of your module
etc: your module configuration
SQL sql requettes was executed to create your module during instalatio
Reminder of the blocks
In Magento, a Block is a piece of your website works "alone", you can insert just anywhere. In fact, a block is a kind of "mini controller" that you can add anywhere in your site.
According to the page on your site, you can assign it different templates based on the view that you want to give it.
The folder/app/code and codePool magento
In this folder you will find three files (these files will be called 3 codePool in magento) that will contain:
Community the community plugins (downloaded magentoconnect example).
Core modules default magento (ESPECIALLY NOT CHANGE)
Local modules you have developed yourself or that have been specially developed for your magento platform. if this directory is not created, you can create it yourself.
Your duties pending the next tutorial:
Try to navigate through the folders of your site to understand what I tell you. Open the files and try to understand them.
Conclusion on the structure of a Magento Module
You saw the structure of the modules magento, if you do your homework you should understand a little better.
Does this sound a bit abstract for now? It's normal ! That's a lot of information and you better at comprendez As the next lessons.
In the next tutorial, we'll start creating our first module by creating the controller.
Do not worry, trust me: we will create a complete module from A to Z, step by step. We will take it easy and you will see that all that you seem somewhat abstract in this first tutorial will become clear as and as we move forward.
Now do your homework! Be brave ;)