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 a 10 percent offer in Drupal Commerce


You've probably seen 5 percent, 10 percent, and 20 percent discounts all over the web on various e-commerce stores, and you too can add one to your own e-commerce website to entice customers to buy from you.

This recipe will guide you through adding a 10 percent discount off on all customer orders in your Drupal Commerce store.

Getting started

Make sure you're logged in to your Drupal Commerce website's administration panel.

How to do it...

Once you're logged in, follow these steps to add a percentage-off promotion to your Drupal Commerce store:

  1. Navigate to Store settings | Discounts, and you will see the Discounts screen.

  2. Click on the Add discount button towards the top-left corner of your screen:

  3. You can now start creating your promotion. Fill the Admin title field in with a suitable value, and select the Order Discount radio button in the Choose discount type block:

    Note

    Note that this field is not shown to your customers.

  4. The next option down the screen is the Choose offer type block; select the % off radio button here, and enter a value of 0.1 in the Percentage field:

    The Percentage field needs to be a decimal value, so 10% if represented as 0.1, while 5% would be represented as 0.05 here, and 25% would be represented as 0.25.

  5. If you wish to run your promotion for a limited amount of time, use the Start date and End date fields to set the period for which you want to run the offer:

  6. Check whether the Discount status field is set to Enabled (its default value). Now click on the Save discount button at the bottom of the screen:

  7. To test your newly added promotion, navigate to the frontend of your Drupal Commerce store, and go through the checkout process; you will see the 10 percent discount applied:

    By default, Drupal Commerce will only apply the discount to the product's cost (excluding any taxes that you have set up). You can apply the discount to shipping costs as well in the Settings tab, available on the Discounts screen at Store settings | Discounts.