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

Creating your first product


Now that you've installed Drupal Commerce, you can start to add products to display to customers and start making money.

In this recipe you will learn how to add a basic product to your Drupal Commerce store.

Getting started

Log in to your Drupal Commerce store's administration panel, and navigate to Products | Add a product:

Tip

This book assumes you enabled the Drupal Commerce admin menu at installation stage. If you haven't, navigate to Site settings | Modules and ensure that the Commerce Kickstart Menu module is enabled for your store.

Note the sample products from Drupal Kickstart's installation are displaying there.

How to do it...

To get started adding a product to your store, click on the Add product button and follow these steps:

  1. Click on the Product display. Product displays groups of multiple related product variations together for display on the frontend of your website.

  2. Fill in the form that appears, entering a suitable Title, using the Body field for the product's description, as well as filling in the SKU (stock keeping unit; a unique reference for this product) and Price fields. Ensure that the Status field is set to Active. You can also optionally upload an image for the product here:

  3. Optionally, you can assign the product to one of the pre-existing categories in the Product catalog tab underneath these fields, as well as a URL for it in the URL path settings tab:

  4. Click on the Save product button, and you've now created a basic product in your store.

  5. To view the product on the frontend of your store, you can navigate to the category listings if you imported Drupal Commerce's demo data, or else you can return to the Products menu and click on the name of the product in the Title column:

  6. You'll now see your product on the frontend of your Drupal Commerce store:

How it works...

In Drupal Commerce, a product can represent several things, listed as follows:

  • A single product for sale (for example, a one-size-fits-all t-shirt)

  • A variation of a product (for example, a medium-size t-shirt)

  • An item that is not necessarily a purchase as such (for example, it may represent a donation to a charity)

  • An intangible product which the site allows reservations for (for example, an event booking)

Product displays (for example, a blue t-shirt) are used to group product variations (for example, a medium-sized blue t-shirt and a large-sized blue t-shirt), and display them on your website to customers.

So, depending on the needs of your Drupal Commerce website, products may be displayed on unique pages, or multiple products might be grouped onto one page as a product display.