Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Magento Theme Design

You're reading from   Mastering Magento Theme Design Magento is the super-capable open source e-commerce platform that's number one for a reason. By using this book to optimize your know-how, you'll be acquiring the ultimate in e-tail expertise for yourself and your clients.

Arrow left icon
Product type Paperback
Published in Apr 2014
Publisher
ISBN-13 9781783288236
Length 310 pages
Edition Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Andrea Sacca Andrea Sacca
Author Profile Icon Andrea Sacca
Andrea Sacca
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Mastering Magento Theme Design
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introducing Magento Theme Design FREE CHAPTER 2. Creating a Responsive Magento Theme with Bootstrap 3 3. Customizing Our Custom Theme 4. Adding Incredible Effects to Our Theme 5. Making the Theme Fully Responsive 6. Making the Theme Socially Ready 7. Creating a Magento Widget 8. Creating a Theme Admin Panel 9. Customizing the Backend of Magento 10. Packaging and Selling the Theme Conclusions and Credits Index

The basic concepts of a Magento theme


Before you begin to create your theme, there are some basics you need to know that will help you. This is supposed to be a review of the basic concepts and techniques that you should already know, which will speed up the development of the theme.

The Magento base theme

The base theme was introduced in the CE (Community Edition) Version 1.4 and EE (Enterprise Edition) Version 1.8. The main difference between the CE and EE is the price and support.

In fact, the CE is open source and anyone can download and use it as an e-commerce platform. The EE has an annual fee of $12,000, and it has the same base of the community edition but it is aimed to companies that needs special customizations, additional functionality, and the support of the Magento team.

It's very important to understand that the base theme of Magento is essential to make the other themes work correctly, which in fact will depend on it. The base theme is the core of the Magento frontend.

The following are the frontend base theme directories:

  • app/design/frontend/base

  • skin/frontend/base/

The hierarchy of files and the fall-back system

The frontend of Magento has been structured in such a way that it allows the designers to create themes based on the basic theme, without changing its structure. This fall-back system allows us to create only the files that are necessary for the customization of our theme. All other files, if any, will be taken from the base theme.

In order to create the theme's files, we can proceed in the following two ways:

  • Create the empty files in the appropriate directories and write all the code by hand. You can choose this option if you are an advanced developer who knows how to get the information in the right way from the database.

  • Copy the files from the base theme and edit them accordingly. You can use this option to analyze and study the code, and learn how to retrieve the information of the products, blocks, and so on.

In this book, we will use the second option, which is easier and faster. In the theme you need to create/duplicate only the strictly necessary files for its customization. This allows you to have a theme that is much lighter and with fewer files.

For example, let's say we want to change the header.phtml file that is the block of the theme header. You can copy the header.phtml file from the app/design/frontend/base/default/template/page/html/ path to the app/design/frontend/custom_package/custom_theme/template/page/html/ path.

Tip

It is absolutely important to know that you must not create a theme under the base package; you should create a custom package and place the themes inside it.

You have been reading a chapter from
Mastering Magento Theme Design
Published in: Apr 2014
Publisher:
ISBN-13: 9781783288236
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime