4. What is Magento?
– Open-source ecommerce platform (php)
– Built on the Zend engine
– Two versions
●
Community (CE) – free
●
Enterprise (EE) – licensed
– Multi-site, multi-store view architecture
– Powers small to enterprise sites
– Large module vendor and developer ecosystem
– Certified Developer Program
– Partner Program
7. Key Concepts
– Magento’s is an MVC application with a
configuration-based representation level
– Codebase structure and module system
– Request flow
– Parts of a page
– CMS pages and CMS blocks
– Layout controllers and html blocks
– Layout xml files and how they work
– .phtml block modifications
9. Concepts
In English that means.
Layout
XML
Block
Template
Load the
layout configs
Go get
the content
Pour it into
a template
Layouts define blocks, blocks load data into templates
17. Concepts
Codebase Structure
Page templates and layout files for a theme are in
app/design/frontend
Images and CSS files for a theme are in
skin/frontend
skin directory
app/code directory
base design package
default theme
app/design directory
base design package
enterprise design package
default theme
custom design package
default theme
enterprise design package
default theme
custom design package
default theme
18. Concepts
Design Fallback
●
●
●
●
Allows building custom themes
by extending from the default
theme
Don’t need (or want) to copy
the entire directory structure
Add only those files that are
different
Final fallback position is
base/default
package called
in admin
theme called
in admin
base design package
(final fallback)
32. Example 2
Interior Designer – Custom Category Page (ex. 2)
Pieces needed –
●
Layout XML to call the template
added to the Design tab for the
category
●
Custom template
●
CMS page and blocks
●
Some custom CSS
38. Example 3
Textiles – Custom Category Page (ex. 3)
Pieces needed –
●
Layout XML to call the template
added to catalog.xml
(overrides for all categories)
●
Layout XML to remove some blocks
●
Layout XML to add other blocks
●
CMS blocks for left nav
●
Custom .phtml template
●
Special stylesheet added to head
44. Front-End Development
by Eric Landmann
Landmann InterActive
Prepared for the
Madison php Conference
11/16/13
elandmann@landmanninteractive.com
@iteratews