Magento
1.4
Themes
Design
Customize
the appearance of
your
Magento
1.4
e-commerce
store with
Magento's
powerful
theming
engine
Richard Carter
[
PUBLISHING BIRMINGHAM-MUMBAI1 open
source
Table
of
Contents
Preface
1Chapter
1:
Introduction
to
Magento
7
What is
Magento?
8Magento's
features9
Differences
between
Magento
1.3
andMagento
1.4 themes 9 DefaultMagento
1.4 themes
10Magento
Default theme
10Modern
theme
17Blue theme
20Showcase
ofMagento
themes
20Harvey
Nichols 21Mark One 23
Zhu Zhu
24
Challenges
ofMagento
themedesign
27Why
create a customMagento
theme? 27Installing Magento
1.4 27Pre-installation
check:magento-check.php
28Downloading
Magento
1.4Community
Edition
30Installing
andconfiguring
Magento
30Configuring
filepermissions
32
Configuring Magento
33
Creating
your
Magento
administration account36
Summary
37Chapter
2:
Exploring
Magento Themes
39
Magento terminology
39Magento
websites andMagento
stores 40Magento
interfaces
41Table
of
ContentsMagento
themes 43 Base theme 44 Default themes 44 Non-defaultthemes 45Blocks in
Magento
46
Content blocks 46 Structural blocks 4?What makes a
Magento
theme?
47Unique aspects
ofaMagento
theme
47Typical Magento
theme
filetypes
48Skins 48
Layouts
48Templates
49Locales 49
Theme
hierarchy
inMagento:
the fallbackpattern
49The base theme 49
An
example
of themehierarchy
50
The
Blank theme52
Installing
andactivating
aMagento
theme 53Installing
aMagento
theme 54Activating
aMagento
theme 56Good
practice
in
Magento theming
60Summary
61
Chapter
3:
Magento
ThemeBasics
63
Magento's
cache 63Disabling Magento's
cache 64Changing
your store'slogo
67Changing
your
store'slogo using
a static block inMagento
71Changing
your store's
favicon 71What is a
favicon?
71Favicon
inspiration
72Changing
the favicon 74Displaying
products
on thehomepage
76Adding
the featuredcategory
77Adding
aproduct
inMagento
80
Finding
yourcategory's
ID 85Adding
thefeatured
category
to thehomepage
86Customizing
thedefault
placeholder product image
90Customizing
theproduct image
watermark
92Chapter
4:
Magento
Theme
Layouts
99
Magento
layout terminology
99
Default
layout
100
Layout
updates
100
Template
Path Hints and Block Name Hints 100Enabling
Template
Path
Hints 100Enabling
BlockName Hints
104
Restricting
who
can see thehints
107
A
brief
guide
toXML
108Self-closing
elements inXML
109Closing
XMLelements
normally
109Entity
escapes in XML
109Changing
apage's
layout
110
Changing
apage's layout through
Magento's
administrationpanel
110
Customizing
aMagento
pagethrough Layout
Update
XML field114
Customizing
aMagento
page
through
layout
files116
Default and
non-default handles in
Magento layout
118 What is ahandle?
118The
default handle
119Non-default handles
119Useful handlesinMagento 120
Summary
121Chapter
5:
Non-default
Magento
Themes
123
Beginning
a newMagento
1.4 theme123
The
casestudy design
124
Creating
newthemedirectories
124
Basic
local.xmllayout
file
125
Enabling
the newtheme
126Styling
your store's header
128Styling
the user accountlinks
130Customizing
thewelcome message 131Styling
the search box 132Customizing
aMagento
templatefile 134Styling
your store's content area136
Styling
the columnblocks
138
Customizing
thesidebarbasket/cart block 139Customizing
the sidebar COMPARE PRODUCTSblock 140Customizing
the sidebarpoll
block 142Table
of
ContentsStyling
your
store's footer146
Changing
the footer links
147The
theme
sofar
150Summary
150Chapter
6: More
Magento
Theming
153
The
theme
sofar
153
Using @font-face
with
Magento
1.4 154Converting
typefaces
for
@font-face
155@font-face
support
acrossbrowsers
155 EOT: InternetExplorer
155 TTF: Safari, Opera, Chrome, and Firefox 155 OTF: Safari, Opera, Chrome,and Firefox 155 SVG: iPhone and Chrome 155 WOFF: Firefox 156CSS
for@font-face
156
Adjusting
font size158
Better results for different
weights
ofatypeface
158Magento's
customer accountviews
159
Styling
thelog
in view 159Styling
theregister
anaccount view 166Navigation
inMagento
167Magento's product
view 170Customizing
the
product
view
template
171
Disabling
Magento
reviewsthrough
the CMS
172
Customizing
theproduct
viewlayout
172Summary
173Chapter
7:Customizing
Advanced
Magento Layout
175
Magento
error messages and views 175Customizing Magento's
404—not found view176
The no
JavaScript
errormessage 183Styling
the default
message inMagento (.note-msg)
186Styling
your store's
breadcrumb 188Adding JavaScript
into your
Magento
theme:
Lightbox-style
effects to
Magento's product
page
192
Adding
aJavaScript
file
using Magento
layout
192
Editing
theproduct template
file to includeLightbox
194Changing image paths
in theJavaScript
file 196Lightbox
extensions forMagento
1.4 197Adding
a conditionalstylesheet
for InternetExplorer
inMagento
198Creating
a newstylesheet
foraprevious
Internet
Explorer
version199
Adding
a newblock to yourMagento
theme
200
Creating
a static block inMagento's
CMS
201
Customizing
yourMagento
store's labels withtranslate.csv
206Adding
a customblock
toMagento
CMS pages 208Summary
209Chapter
8:
Magento
Templates
211
Transactional
e-mailtemplates
in
Magento
211Customizing Magento
newslettertemplates
218
Integrating
external HTML
newslettersystems
withMagento
221Making Magento
templates
ready
for
use 228Testing
e-mailtemplates
230Summary
230
Chapter
9: Social Media and
Magento
231
integration
withMagento
232Adding
a'Follow Us
On Twitter' button to yourMagento
store 232Generating
the markupfrom the Twitter website 232Adding
astaticblockinMagentoforyour Twitter button 234Updating
your theme'slayout
file for the'Follow Us' button 235
Embedding
a 'latest tweets'widget
into your
Magento
store 236Integrating
Twitterthrough Magento
extensions
241Integrating
Facebook withMagento
242Adding
a 'Like' buttonto your
Magento
store's
product
pages
243
Getting
the 'Like' button markup 244Integrating
theFacebook 'Like box'
widget
in yourMagento
store 247Integrating
Magento
extensions251
Further social
mediaintegration
withMagento
252Social
bookmarking
inMagento
252 ShareThisProductextension forTwitter, Facebook, andMySpace
252Magento
SocialBookmarking
Services extension 252Logging
inwith
asocial
networking
account 252Summary
253Chapter
10:
Magento
Style
255
Magento
Default
theme'sprint styling
255
Using Magento layout
to include astylesheet
260
Creating
a customstylesheet
for yourMagento
theme
261
style
for content blocks inMagento
261
Table