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

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.

eBook
$24.99 $36.99
Paperback
$60.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Mastering Magento Theme Design

Chapter 1. Introducing Magento Theme Design

Creating a Magento theme can be more complicated than any other CMS (Content Management System). This is because Magento has a complex structure and the files are located in multiple directories.

In this chapter, we will analyze the concepts and basic information that you need to know about the design of Magento, how to create the structure of a new theme, and how to activate it.

At the end of this chapter, you will be able to create the foundation of your theme, ready to be developed.

The following topics will be covered in this chapter:

  • The basic concepts of a Magento theme

  • The structure of a Magento theme

  • Structural blocks and content blocks

  • CMS blocks and pages

  • Variables

  • Widgets

  • Creating and activating a theme

  • Tips and tricks

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.

The structure of a Magento theme


The files in a Magento theme are divided into two main directories: app and skin, as shown in the following screenshot:

The following is the description of the two directories:

  • app: The app/design/frontend/base/default/ directory contains the layout, translation, and template files

  • skin: The skin/frontend/base/default/ directory contains the images, CSS, and JavaScript files

Design packages and design themes

Magento allows you to incorporate the themes in design packages. This provides greater flexibility to manage the graphics and design of a store.

The following screenshot shows the base package and the default theme:

The main advantage of packages is very simple: we can create a default theme and endless themes with the graphic variants for the same store without having to change the entire theme.

Directory 1 – app

This directory contains the layout, translation, and template files.

The layout subdirectory

The layout subdirectory allows you to define the structure of the pages through the XML files. Various page types and blocks within each page type are defined in respective XML files. Using XML, you can also incorporate CSS files or JavaScript either to be loaded throughout the site or for specific pages.

There are layouts for page types such as a catalog and category, but not for CMS pages; for them you can define custom XML directly from the admin.

Each page, part, and block of the theme is defined by an XML file. Every page is defined by a handle. To understand better how they work, we need to have an overview of the handles.

The following are the two main handles:

  • Default handles that manage the whole site

  • Non-default handles that handle specific parts of the site

A handle is a reference name that Magento uses to refer to a particular page. For example, the <cms_page> handle is used to control the layout of the pages in your Magento store created through the CMS (Content Management System). Another example is the <catalog_product_view> handle used to control the layout of the product view page.

The XML files are located in app/design/frontend/base/default/layout/. For the curious, the following is a piece of code of the XML file page.xml:

In this example, we see in action the <default> handle that defines the generic JavaScript and CSS for the whole theme.

For the layout, there is no need to duplicate every single XML file to change the appearance of a block; just insert a JavaScript file or CSS file. In fact, with the exception of template files, we can create a single XML file where we can declare all the information that will add or override information of the basic theme.

For example, if we want to insert a new custom JavaScript test.js file in the head for the whole site (where all the main JS are defined), we don't need to duplicate the page.xml file, and declare the new JavaScript file there. Overrides should go in the local.xml file of our theme.

So, we can insert the new custom JavaScript test.js file in the header for the whole site by performing the following steps:

  1. Open the page.xml file from app/design/frontend/base/default/layout/page.xml (we open that file only for reference). Check how the JavaScript is declared in the base theme. In this case, we will see that the generic JavaScript is declared in the <default> handle in the following way:

    <action method="addJs">
    <script>varien/js.js</script></action>

    Please note that this directory is typically used by third-party extensions to store JS files. The JS loaded from themes is expected to be stored in /skin/frontend/package/theme/default/js and they are declared similarly using the following way:

    <action method="addItem">
    <type>skinJs</type><script>js/test.js</script></action>
  2. In the layout.xml file, insert the action in our default handle, and change it.

  3. Create the JS file in the specified folder in [magento_root]/skin/frontend/package/default/js/test.js.

Templates

The template files are the PHTML files, a mix of HTML and PHP. These files contain the code of the various blocks and are located at app/design/frontend/base/default/template/.

The following screenshot shows a piece of code of the header.phtml file located at app/design/frontend/base/default/page/html:

Locales

Locales contain the files of localization and translation of the theme. The folder that contains translation files of the theme is app/design/frontend/base/locale.

The file that handles the translations must be named translate.csv, and within it, we're going to insert the original lines of text that are defined in the translations, or of the new text that we created in the PHTML file.

To find the default Magento localizations lines of text, you can explore the files at app/locale/en_US. If you open this folder, you can see that the translations are organized in various CSV files. Each of them represents a specific section of the site. For example, the Mage_Catalog.csv file includes all the text about the catalog pages of the site.

The locale folder contains many folders, as there are translations that we want provide, and the translate.csv file must be placed inside the language folder. For example, app/design/frontend/base/locale/en_US/translate.csv.

en_US is the name of the folder that indicates the language of the localization (en) and the country or region of the language (US).

For example, if we want to create an Italian version of the theme, we have to duplicate the translate.csv file from app/design/frontend/base/locale/en_US/ to app/design/frontend/base/locale/it_IT/.

This will be very useful to those who use the theme and will have to translate it in the future.

As I said before, we can change some existent translations or create a new one for the custom text that we insert in the PHTML files. To change the existent translation, we have to proceed in this way. For example, let's suppose that we want to change the text of the Add to Cart button from the default Add to Cart to Buy. We have to write in our two CSV columns. In the first column, the original text, and in the second column, the translated text: Add to Cart, Buy.

Alternatively, you can use the inline translation that will be stored in the database and is the final fallback. However, for theming the method described previously, it is better to have the theme localized.

Creating new translatable entries

Let's suppose that you want to add a new title or a new text line into a block. Inside the PHTML file, to make the line translatable, you must incorporate the text into the PHP code in the following way:

<?php echo $this->__('New text') ?>

Now, put the following in the default CSV file: "New text","New text".

When I say "the default CSV file", I mean the English version of the translate.csv file.

Directory 2 – skin

The skin folder contains CSS and .js files and images of the theme and is located at skin/frontend/base/default/.

Structural blocks and content blocks

The following screenshot shows Reference Blocks and Content Blocks:

The reference blocks or structural blocks are the blocks that precisely define the container of the content blocks. For example, the header, the footer, the left and right sidebar, and the main content are a part of structural blocks. These blocks are defined in the layout XML files and the source files in the template files.

The content blocks are the blocks that hold the content. The structural blocks hold these blocks. For example, the logo, the links at the top, and the search are "content blocks" that are placed inside the reference block "header".

CMS blocks and page

CMS (Content Management System) pages and blocks are static pages and blocks that you can manage through the admin panel. Both CMS pages and CMS blocks can contain the HTML code and Magento variables (check the next topic for more information).

CMS blocks

CMS blocks are blocks that you can create from the admin panel. They are useful for allowing the end user to customize some parts of the theme without modifying the files directly by the admin.

To create a CMS block, navigate to Admin Panel | CMS | Static Blocks as shown in the following screenshot:

Let's say, a customer needs to insert a banner independently, but hasn't HTML or other programming knowledge. We can create a link to a specific CMS block into an XML file that the customer can directly edit by admin, using the editor to insert text or an image.

CMS pages

CMS pages are the pages that can be created directly from the admin panel. CMS pages are static pages such as Homepage, About Us, and Customer Service. They are available via their own URL address that can be defined with his content from the admin as well.

You can create new pages by navigating to Admin Panel | CMS | Pages, as shown in the following screenshot:

CMS pages can contain html code and Magento variables. You can also customize the page aspect through the Design tab, where you can choose the layout of the page, and add additional Layout Update XML that will overwrite the local.xml file as shown in the following screenshot:

Magento variables

Magento variables, which were mentioned in the previous topic, are moveable pieces of plain text or HTML content that are great for adding to transactional e-mails, or adding a constant copy and designs to your store with static blocks and CMS pages.

By doing so, custom text and design can be created once and applied to multiple areas to save the merchant time.

Magento comes with some system variables such as {{store url=""}} (stores the website address), {{var logo_url}} (URL of the store logo), and many others. For a full reference about Magento variables, check the Magento blog at http://www.magentocommerce.com/knowledge-base/entry/defining-transactional-variables.

We can also create a new custom variable from the admin panel. To create a custom variable, perform the following steps:

  1. In the backend, navigate to System | Custom Variable as shown in the following screenshot:

  2. Click on the Add New Variable button.

  3. In the Variable Code field, enter the variable identifier only in lowercase and with no spaces, for example, store_city, as seen in the following screenshot:

  4. Enter Variable Name, only for internal purposes.

  5. Enter the HTML code or plain text in one of the relative text areas and save it.

    Note

    The html code of this new variable that you created will be{{CustomVar code="store_city"}}. It is important to insert it with the editor hidden, or the editor will change the code.

Now, you can use this variable in the transactional e-mail, or in CMS pages, or also in CMS blocks. For example, insert the custom variable in the About Us page by performing the following steps:

  1. Open the CMS About Us page (this page is present only if you are working on Magento with sample data).

  2. Hide the editor and insert the following line:

    <p>Our store Location: {{CustomVar code="store_city"}}</p>

    This is shown in the following screenshot:

  3. Save the page and go to the frontend at http://path_to_magento/about-magento-demo-store; the following will then appear:

    You can also add the custom variable through the Insert Variable button, which is visible when the editor is hidden.

Widgets

Magento widgets are frontend blocks with a predefined set of configuration options. These configuration options are displayed in a special edit form in the backend panel when a widget is being added or edited by a store owner. The ability to easily set widget configuration options allows store owners the full control of widget placement on a page.

Magento widgets allow users with no technical knowledge to easily add dynamic content (including product data, for example) to pages in Magento stores. This allows the user to create informational and marketing content through administrator tools with some easy steps. Some examples of widgets are as follows:

  • CMS blocks (yes, you can add a CMS block in a page as a widget)

  • Recently viewed items

  • Catalog product link

The same options can also be seen in the following screenshot:

We will discuss more about this topic in the chapter dedicated to creating a widget.

Creating the theme


Once you understand the hierarchy of themes and know the basic information, you are ready to create your own custom theme. But, before you put your hands on the code, I will always recommend that you already have a mock-up to be developed, rather than designing as you go.

This will allow you to have a clear idea of what you will achieve without wasting unnecessary time to decide the position of the blocks. In this case, I have prepared the following custom layout for a hypothetical store selling books online:

Now that we a mock-up ready to be transformed into a Magento theme, you have to decide the name of the package to create and use that for the whole project.

I will call my theme package "bookstore"; you could create one with your name, the name of your customer, or the name of the project.

Starting with the app folders

Now let's see how to begin the creation of our new theme, starting from one of the main folders, the app folder .

  1. Create the bookstore package folder at app/design/frontend/, so you will have app/design/frontend/bookstore.

  2. Create the child theme folder default at app/design/frontend/, so you will have app/design/frontend/bookstore/default.

  3. Create all the necessary subfolders inside the default theme:

    • app/design/frontend/bookstore/default/template

    • app/design/frontend/bookstore/default/layout

    • app/design/frontend/bookstore/default/locale

Creating the skin folders

Once we have created the app, let's create the skin folder. This folder contains the static files of the theme such as images, JSS, and CSS files.

  1. Create the bookstore package folder at skin/frontend/, so you will have skin/frontend/bookstore.

  2. Create the default theme folder at skin/frontend/, so you will have skin/frontend/bookstore/default.

  3. Create all the necessary subfolders inside the default theme:

    • skin/frontend/bookstore/default/images

    • skin/frontend/bookstore/default/css

    • skin/frontend/bookstore/default/js

To sum up, we will have the structure as shown in the following screenshot:

Creating the necessary files

Now that our theme structure is ready, we have to create the main files we need. As I said before, we can create empty files or copy the files from the base theme. I recommend that you copy the files from the base theme, so you already have blocks and blocks of code that we can keep and edit as you wish.

We start by creating the main files in the app folder, by performing the following steps:

  1. Copy the template files. Only copy the following ones, and not everything, and only use what needs to be changed; less is more! Copy the files from app/design/frontend/base/default/template/ and paste them to app/design/frontend/bookstore/default/template/:

    • /page/1column.phtml: This is the file that handles the structure of the page with one column

    • /page/2columns-left.phtml: This is the file that handles the structure of the page with two columns, with the sidebar on the left

    • /page/2columns-right.phtml: This is the file that handles the structure of the page with two columns, with the sidebar on the right

    • /page/2columns-left.phtml: This is the file that handles the structure of the page with three columns (main content and two sidebars)

    • /page/html/head.phtml: This is the file for the head of the theme

    • /page/html/header.phtml: This is the building block of the file header of the theme

    • /page/html/footer.phtml: This is the file of the footer structural block of the theme

  2. Create the layout.xml file at app/design/frontend/base/default/layout/. This basic structure of the local XML file is similar to the following code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    /**
     * local.xml
     * Local layout modifications for our local theme
     * @category    design
     * @package     bookstore
     * @copyright   Copyright (c) 2013 Andrea Saccà.
     */
    -->
    <layout version="0.1.0">
    <default>
    
    </default>

    In the next chapter, we will see how to override specific positions, insert JavaScript, CSS files, and other cool stuff.

  3. Copy the template files present at skin/frontend/bookstore/default/css/, where styles.css is the main stylesheet and print.css is the style sheet used for printing.

Disabling the cache

Now that we have the basis of the theme ready, before activating it, we have to disable the caching system of Magento throughout the development phase to avoid any inconsistencies during the development process by performing the following steps:

  1. Navigate to the Admin Panel, System | Cache Management; the following page opens:

  2. Select all the items and in the Actions dropdown, select Disable, and click on the Submit button to save. After doing this, you should see the success message and the page looks similar to the following screenshot:

Activating the theme

Ok we are ready! Now that we have our theme and have disabled the cache, let's activate the theme. To activate the theme, go to System | Configuration | Design tab.

Tip

Keep in mind that the scope of the default configuration is a single website/store view. You can check this configuration on the left-hand side of this page. If you are using a multistore, and you want to have different designs for different stores, you should define the design package or theme by switching first to the configuration scope on the left, selecting the appropriate store view.

Inside the Package box, insert the name of the package you created before in the Current Package Name option. In this case, we insert bookstore, and then click on the Save Config button, as shown in the following screenshot:

In this way, we are telling Magento to use our bookstore package for the current configuration.

Our theme is now ready and active. Let's go to the frontend and see what happens. If you have done everything right, you should see the following page:

As you can see, it is a blank page with no style, but don't worry about that. Now we have created our theme that is ready to be customized!

Tips and tricks


There is some stuff that you must know while creating a theme. The following tips will help you in cases of extreme necessities, particularly when you are looking for a specific file to override.

Template path hint

The app/design/frontend/base/default path contains a lot of files, all divided into many folders. It's a bit hard to remember the path and name of every file. In order to find the path of a file in the base theme, we need to customize and then copy our theme; Magento comes to us with the Template Path Hints option.

This feature will help you a lot if you don't know the position of any file and will help you to speed up the theme creation.

To enable this feature, perform the following steps:

  1. In the Admin panel, navigate to System | Configuration.

  2. On the left side at the bottom in the Advanced box, click on Developer.

  3. On the left side in the Current Configuration Scope box, select the Main Website, option or your own website.

  4. Now, in the Debug box to the right, select YES to Template Path Hints.

  5. Save the configuration.

Back in the frontend, we can see each block surrounded by a red border, with the PHTML file path that generates it.

In this way, we can copy the files from the base theme and paste them to the same location of our theme.

Tip

Alternatively, you can use the Templates Hints 2 module created by Fabrizio Branca at http://www.fabrizio-branca.de/magento-advanced-template-hints-20.html.

The following screenshot shows the template path hints in action. As you can see, each block is surrounded by a red border with the path to the file that generates it:

This is an example of what the screen in this program looks like.

Disabling the WYSIWYG editor

Another useful tip is to disable the WYSIWYG text editor. This will save you a lot of time when you have to write the HTML code inside the CMS pages or blocks, and you can prevent the editor from changing the code you've written.

To disable it, navigate to System | Configuration | Content Management, as shown in the following screenshot:

Here you have three options. You can choose to leave it as Enabled by Default (the default configuration), or you can choose to disable it completely, or to disable by default. I recommend that you at least disable it completely in the development phase.

Summary


Now you have all the basic components to create a custom theme for Magento, and all the information you need create the foundation of your new theme.

In this chapter, you learned the Magento theme design's basic information, the difference between package and theme, and how to create and activate a custom package with the main folders and files.

And now? Now it is time to have fun! In the next chapter, you will add the Bootstrap framework to the theme and start customizing it.

Left arrow icon Right arrow icon
Estimated delivery fee Deliver to South Africa

Standard delivery 10 - 13 business days

$12.95

Premium delivery 3 - 6 business days

$34.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 25, 2014
Length: 310 pages
Edition :
Language : English
ISBN-13 : 9781783288236
Vendor :
Magento
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to South Africa

Standard delivery 10 - 13 business days

$12.95

Premium delivery 3 - 6 business days

$34.95
(Includes tracking information)

Product Details

Publication date : Apr 25, 2014
Length: 310 pages
Edition :
Language : English
ISBN-13 : 9781783288236
Vendor :
Magento
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 109.98
Mastering Magento Theme Design
$60.99
Learning Magento Theme Development
$48.99
Total $ 109.98 Stars icon

Table of Contents

10 Chapters
Introducing Magento Theme Design Chevron down icon Chevron up icon
Creating a Responsive Magento Theme with Bootstrap 3 Chevron down icon Chevron up icon
Customizing Our Custom Theme Chevron down icon Chevron up icon
Adding Incredible Effects to Our Theme Chevron down icon Chevron up icon
Making the Theme Fully Responsive Chevron down icon Chevron up icon
Making the Theme Socially Ready Chevron down icon Chevron up icon
Creating a Magento Widget Chevron down icon Chevron up icon
Creating a Theme Admin Panel Chevron down icon Chevron up icon
Customizing the Backend of Magento Chevron down icon Chevron up icon
Packaging and Selling the Theme Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(5 Ratings)
5 star 80%
4 star 0%
3 star 0%
2 star 0%
1 star 20%
mrGott Nov 01, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is what I wanted. A great book for theme development. There are many others but this one covers topics that were very interesting for me.
Amazon Verified review Amazon
Alfredo Kang Jun 28, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Livro muito bom, um dos melhores que ja Li, relacionado ao desenvolvimento de temas em Magento, bem detalhado e de facil compreensao, recomendo a todos.
Amazon Verified review Amazon
JC Mar 27, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is the best resource to learn magento the development, no other book comes close to this.I was able to learn and apply the techniques of this book on my first custom magento theme at work, it was very straightforward, and the theme used in the book uses nice css3 effects.Overall in my opinion compared to others, this is the best book on magento theme design
Amazon Verified review Amazon
Daniele Rutigliano Dec 09, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Il libro è chiarissimo, nonostante sia in inglese. Gli esempi pratici e gli screenshot aiutano molto il lettore. Inoltre è molto dettagliato... Direi illuminante! Consigliatissimo. I 37,00 euro sono ben spesi, fidatevi!
Amazon Verified review Amazon
Mantas Jocius Aug 13, 2016
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
A lot of mistakes in code examples.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela