Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design & Module Development

Similar presentations


Presentation on theme: "Design & Module Development"— Presentation transcript:

1 Design & Module Development
Magento 1 Stenik Group Ltd. Martin Grozdanov Software University © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license. 1

2 Last time Magento Installation Administration & Frontend
Basic File Architecture Basic Module Components © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license. 2

3 Table of Contents Convention URLs’ structure Design elements
Design Fallback Design Development Module Development 3 © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license. 3

4 Magento Class Convention
Magento uses Zend Framework’s convention All classes are named by their path. For example: No closing php tag in .php files! <?php # .../Mage/Catalog/Model/Product.php class Mage_Catalog_Model_Product extends … { } 4

5 URL structure <frontName> – keyword defined by module <controller> – relative path&name of the controller <action> - The controller’s method’s name without the Action suffix. 5

6 Design – Blocks Module components used to provide information to the layout. 6

7 Design - Layouts .xml files used to describe the pages’ layout
Basic components: handles blocks actions removes 7

8 Design - Templates .phtml files used to describe the HTML of some element Basic functions: Block’s methods getChildHtml 8

9 Design Fallback Magento first checks the sat up package’s theme
Next - package’s default theme Next - base package’s theme 9

10 Creating a module Step 1. Tell Magento for your module by creating file in app/etc/modules/SoftUni_Submission.xml <?xml version="1.0"?> <config> <modules> <SoftUni_Submission> <active>true</active> <codePool>local</codePool> </ SoftUni_Submission > </modules> </config> 10

11 Creating a module Step 2. add config.xml for your module by creating file in app/code/local/SoftUni/Submission/config.xml <?xml version="1.0"?> <config> <modules> <SoftUni_Submission> <version>1.0.0</version> </ SoftUni_Submission > </modules> </config> 11

12 Creating a module Step x. Create Helper – you may need it.
Define it in config.xml Create helper class in app/code/local/SoftUni/Submission/Helper/Data.php 12

13 Creating a module Step x. Create installer
See Mage_Sales’s installer, how it’s defined in the ‘resources’ tag in it’s config.xml and how tables are created in the sql folder 13

14 Creating a module Step x. Create Models, Controllers, Blocks, layouts and etc. Define it in config.xml Create their class/file 14

15 © Software University Foundation – http://softuni.org
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license. 15

16 Thank you 16

17 License This course (slides, examples, demos, videos, homework, etc.)
is licensed under the "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International" license 17 © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license. 17

18 Trainings @ Software University (SoftUni)
Software University – High-Quality Education, Profession and Job for Software Developers softuni.bg Software University Foundation softuni.org Software Facebook facebook.com/SoftwareUniversity Software University Forums forum.softuni.bg © Software University Foundation – This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license. 18


Download ppt "Design & Module Development"

Similar presentations


Ads by Google