1 / 19

Magento #1 - MVC - Template - WorkFlow

VIDA. Magento #1 - MVC - Template - WorkFlow. MVC. Mage_Model Mage_Model_Resource. Mage_Controller_Front Mage_Events. Mage_Block Mage_Helper. Class naming conversion. Zend -style Format Mage_Catalog_Model <Namespace>_<Module-name>_Model_ Notes: Case sensitive Camelcase

willis
Télécharger la présentation

Magento #1 - MVC - Template - WorkFlow

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VIDA Magento #1- MVC- Template- WorkFlow

  2. MVC • Mage_Model • Mage_Model_Resource • Mage_Controller_Front • Mage_Events • Mage_Block • Mage_Helper

  3. Class naming conversion • Zend-style • Format • Mage_Catalog_Model • <Namespace>_<Module-name>_Model_ • Notes: • Case sensitive • Camelcase • Likipe_Demo_Model_CustomerService • Subfolder for each “dash”

  4. Class naming conversion • Naming conversion

  5. Controller • Routing • Front controller • URL Rewrite • HTACCESS • Verify routingMage::app()->getFrontController()->getRequest()->getRouteName()

  6. Model • E.A.V (Entity–Attribute–Value) • Use • Mage::getModel() • Mage::getSingleton() • Resources • DB layer to work with MySQL • = table in MySQL

  7. View • Blocks • Theme

  8. Block • Template: “A Block is a box (or any other form) where your module is shown”

  9. Block • Develop: “A Block is a class that includes all functions which helps to display data in view”

  10. Block - Types

  11. Block – How to call

  12. Template - theme skin app css layout Theme Concept images template js locale theme

  13. Template - theme • Layouts : XML files, define block structure(module layout) , in which you decide to put some box in some page as a module function. • Templates : phtml files, in which you do the coding with xhtml and PHP. • Locale: language translations in .csv file format. • Skins : css, images, javascript, where u do the beautifications.

  14. Theme fallback

  15. Theme development

  16. Theme development

  17. Workflow – Theme development

  18. Workflow – Theme development • Use local.xml • Remove/add blocks • Change template file • Copy xml files: • Layout change (modify on many blocks) • Copy phtml files • Keep the PHP codes (correct data) • HTML changes only • Translate via /locale/sv_SE/translate.csv

  19. Workflow Requirement

More Related