Magento Basics part 2 Modules Themes Magent Stenik
Magento Basics part 2 Modules & Themes Magent Stenik Group Ltd. Martin Grozdanov martin@stenik. bg Software University http: //softuni. bg o
Table of Contents 1. Using PHP 7 With Magento 2. Magento & Modules 3. Installing modules – Cons 4. Magento & Composer 5. Themes 6. Modules’ Basic Components 7. Modules’ Basic File Architecture 2
sli. do # softuni-magento
Using PHP 7 With Magento? Patch it. https: //github. com/Inchoo_PHP 7/tree/master 4
Magento & Modules Magento is module based framework Most of Magento’s core modules are dependent of each other. Naming convention <Namespace>_<Module> Mage_Customer Mage_Catalog Every module is declared with XML file in app/etc/modules/ 5
Installing modules - Cons Magento Connect Install & Cons The module cannot be committed using Magento Connect. The module is hard to be updated from other machines. Manual Install & Cons The module is hard to be updated. 6
Magento & Composer { "minimum-stability": "dev", "repositories": { "firegento": { "type": "composer", "url": "https: //packages. firegento. com" } }, "require": { "magento-hackathon/magento-composer-installer": "3. 0. *" }, "extra": { "magento-root-dir" : ". /", "magento-deploystrategy": "copy", "magento-force": "override" } } Installing module with composer 7
Themes What are themes? Themes in Magento are the representative part Magento – HTML & Layout. Each theme is within package – similar to modules’ namespaces. Installation Just like modules – via Magento Connect, Manual, Composer and etc. 8
Modules’ Basic Components Controllers What to be seen/used. Models Things to be seen/used. Blocks (Views) How to be seen. Helpers The other components’ sidekicks. config. xml Configuration Installers & Updaters 9
Modules’ Basic File Architecture app/etc/modules/<Namespace>_<Module>. xml app/code/<pool>/<Namespace>/<Module>/ Block controllers Helper Model etc sql . . . 10
Themes’ Basic File Architecture app/design/frontend/<package>/<theme> layout template … skin/frontend/<package>/<theme> css images js … 11
License This course (slides, examples, demos, videos, homework, etc. ) is licensed under the "Creative Commons Attribution. Non. Commercial-Share. Alike 4. 0 International" license
Trainings @ Software University (Soft. Uni) Software University – High-Quality Education, Profession and Job for Software Developers softuni. bg Software University Foundation softuni. org Software University @ Facebook facebook. com/Software. University Software University Forums forum. softuni. bg
- Slides: 13