Book Image

Building E-commerce Sites with Drupal Commerce Cookbook

By : Richard Carter
Book Image

Building E-commerce Sites with Drupal Commerce Cookbook

By: Richard Carter

Overview of this book

<p>Get to grips with Drupal Commerce, the new ecommerce framework based on the Drupal CMS , one of the most popular and powerful open source content management systems available.<br /><br />"Building E-commerce Sites with Drupal Commerce Cookbook" takes you through the installation, configuration, and customisation of your Drupal Commerce store. With clear, practical recipes with plenty of screenshots and tips this book will help you build attractive and profitable eCommerce sites.<br /><br />This book starts by showing you how to install and configure your Drupal Commerce store. Once your shop is up and running, you’ll then learn how to customise and optimise it to make it stand out and display your products better.<br /><br />Going further into customisation, you will learn to add custom product types before creating a stylish new Drupal theme for your store. Packed with tips, this book will also help guide you through common problems, as well as optimising and managing your store on a day to day basis.<br /><br />"Building E-commerce Sites with Drupal Commerce Cookbook" will guide you through everything you need to know to get your online store up and running and selling your products, with easy step-by-step guides and screenshots to help walk you through everything.</p>
Table of Contents (17 chapters)
Building E-commerce Sites with Drupal Commerce Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Theming Drupal Commerce's cart page


Distinct from the checkout page, Drupal Commerce's cart page shows your customers a review of the order they're about to make.

This recipe will walk you through how to overwrite Drupal Commerce's cart page template, to give you the knowledge you need to start customizing your store's theme more deeply.

Getting started

Using the subtheme Defacto that you created in a previous recipe, you will add this theme to your store to proceed with this recipe. Ensure you have the Defacto theme enabled and set as the default theme on your website, too. Go to Site settings | Appearance to change this.

How to do it...

Follow these steps to overwrite the default Drupal Commerce cart page with your own custom template:

  1. Create a file in the /sites/all/themes/defacto/templates directory of your Drupal Commerce installation called page--cart.tpl.php.

    Tip

    Note the double hyphen character between page and cart.

  2. Copy the contents of the page.tpl.php file in /profiles/ commerce_kickstart...