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

Customizing the Drupal Commerce checkout


Alongside products and categories, the checkout is a fundamental part of any online store, and it's important to get it right. As with other views in Drupal Commerce, you can customize your checkout through Drupal themes.

Getting started

You will need to create your own Drupal theme before performing the following steps; see the Creating a new theme for Drupal Commerce recipe.

How to do it...

To style the checkout page, you can edit both CSS and the HTML file that Drupal uses to style and structure these elements:

  1. Navigate to your store's checkout by adding a product to your cart, and clicking on the Checkout button on the Shopping Cart page. As you can see, the checkout page is currently functional, but a little bare:

  2. Open your theme's stylesheet (for example, /sites/all/themes/defacto/defacto.css), and apply the following style to alter the style of the Order total block:

    .field-name-commerce-order-total .field-items {
      background: #88aa00 !important...