Magento

18
M agento -K now how w hatan eC om m erce platform is to com plete yourknowledge aboutweb solutions Luu Thanh Thuy CWI Team

description

Present by Thuy in CWI at eXo Platform SEA

Transcript of Magento

Page 1: Magento

Magento - Know how what aneCommerce platform is to completeyour knowledge about web solutions

Luu Thanh Thuy

CWI Team

Page 2: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 2

Agenda

- Introduction to Magento

- Architect of Magento

- Customize Magento

+ Developing themes+ Developing extension

Page 3: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 3

Overview of Magento

- Magento: the industry’s most popular platform with over 31% of the current market share

Page 4: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 4

Installing Magento CE

System requirementSystem requirement

Supported Operating Systems: Linux server x86, x86-64Supported Web Servers: Apache 1.3.x or Apache 2.xPHP Compatibility: 5.2.13 and above with Safe mode off MySQL: 4.1.20 and above

Page 5: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 5

Introducing Magento Frontend

OverviewOverview

Finding the right productsFinding the right products

Promotional informationPromotional information

Customer dashboardCustomer dashboard

Page 6: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 6

Introducing Magento backend

• Understanding the scope : Magento CE E enables you to organize your Understanding the scope : Magento CE E enables you to organize your operations into multiple websites, stores, and store views.operations into multiple websites, stores, and store views.

• Supervising Web Store ActivitiesSupervising Web Store Activities

• Managing OrderManaging Order

• Managing Ratings and ReviewsManaging Ratings and Reviews

• Generating ReportsGenerating Reports

• Setting Up Your CatalogSetting Up Your Catalog

Page 7: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 7

Magento architecture

MVCMVC

Base on Zend FrameworkBase on Zend Framework

Modules under app/codeModules under app/code

Design under app/designDesign under app/design

Varien LibVarien Lib

Page 8: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 8

Magento architecture

MVCMVC

Base on Zend FrameworkBase on Zend Framework

Modules under app/codeModules under app/code

Design under app/designDesign under app/design

Varien LibVarien Lib

Page 9: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 9

Zend Framework and its role within Magento What is Zend FrameworkWhat is Zend Framework

It's role and effect in MagentoIt's role and effect in Magento

Page 10: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 10

Core code separation

Three folders under app/codeThree folders under app/code

- core is untouchable- core is untouchable

- community is for downloadable extensions from Magento Connect- community is for downloadable extensions from Magento Connect

- local is for your own custom modules- local is for your own custom modules

Page 11: Magento

Modules and how they work within thesystem

-Magento primarily works on a base of modules. All functionality is divided up -Magento primarily works on a base of modules. All functionality is divided up into modules that make up the system overall.into modules that make up the system overall.

- Modules included with Magento- Modules included with Magento

• • Mage_AdminMage_Admin

• • Mage_AdminNotificationMage_AdminNotification

• • Mage_ApiMage_Api

• • Mage_BackupMage_Backup

• • Mage_BundleMage_Bundle

• • Mage_CatalogMage_Catalog

…………

Page 12: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 12

Create a Magento Extension

Setting up the folder structure of a module

Setting up the folder structure of a moduleSetting up the folder structure of a moduleour module's core folders will be placed in /app/code/local/our module's core folders will be placed in /app/code/local/HN/Bridalregistry/.HN/Bridalregistry/.

The folder structure breaks down as follows:The folder structure breaks down as follows:• • Block/Block/• • controllers/controllers/• • etc/etc/• • Model/Model/ Mysql4/Mysql4/ Book/Book/• • sql/sql/ bridalregistry_setup/bridalregistry_setup/

Page 13: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 13

Create a Magento Extension

Configuring the moduleConfiguring the moduleWe'll create the file /app/code/local/HN/Bridalregistry/etc/config.xml and fillWe'll create the file /app/code/local/HN/Bridalregistry/etc/config.xml and fillit with the following:it with the following:<config> <config> <modules><modules> <HN_Bridalregistry><HN_Bridalregistry> <version>0.1.0</version><version>0.1.0</version> </HN_Bridalregistry></HN_Bridalregistry> </modules></modules><frontend><frontend> <routers><routers> <bridalregistry><bridalregistry> <use>standard</use><use>standard</use> <args><args> <module>HN_Bridalregistry</module><module>HN_Bridalregistry</module> <frontName>bridalregistry</frontName><frontName>bridalregistry</frontName> </args></args> </bridalregistry></bridalregistry> <checkout><checkout> <args><args> <modules><modules> <HN_Bridalregistry before="Mage_Checkout">HN_Bridalregistry_Checkout</HN_Bridalregistry><HN_Bridalregistry before="Mage_Checkout">HN_Bridalregistry_Checkout</HN_Bridalregistry> </modules></modules>

Page 14: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 14

Create a Magento Extension

•Layout updateLayout update

•TranslationTranslation

•RouterRouter

•Helper ModelHelper Model

•Model Model

Page 15: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 15

Create a Magento Extension

How to rewrite the Magento featureHow to rewrite the Magento feature

•Rewrite BlockRewrite Block

•Rewrite ControllerRewrite Controller

•Rewite ModelRewite Model

Page 16: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 16

Create a Magento Theme

-The template system architectureThe template system architecture

The template architecture is broken into three areas—two for development of theThe template architecture is broken into three areas—two for development of thetheme and one for the containment of the assets:theme and one for the containment of the assets:• • /app/design/frontend/default/<template_name>//app/design/frontend/default/<template_name>/ layout/—For all the XML files declaring which module tiedlayout/—For all the XML files declaring which module tied functions should be called to which template filesfunctions should be called to which template files template/—For all the templates processing the output thattemplate/—For all the templates processing the output that is passed from functions called from layout/ and structuredis passed from functions called from layout/ and structured into the final output to the user.into the final output to the user.• • /skin/frontend/default/<template_name>/—For the containment/skin/frontend/default/<template_name>/—For the containmentof all assets relating to our template, images, CSS, Flash, and JavaScript.of all assets relating to our template, images, CSS, Flash, and JavaScript.

Page 17: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 17

Create a Magento Theme

Structural blocks and content blocksStructural blocks and content blocks

Each theme contains structural and content blocks. Structural blocks are the onesEach theme contains structural and content blocks. Structural blocks are the onesthat lay out the theme into sections. Let's take a look at a three-column layout.that lay out the theme into sections. Let's take a look at a three-column layout.The following are the structural blocks in a three-column layout:The following are the structural blocks in a three-column layout:• • headerheader• • leftleft• • contentcontent• • rightright• • footerfooter

Page 18: Magento

www.exoplatform.com - Copyright 2012 eXo Platform 18

Question & Answer