Book Image

Getting Started with Drupal Commerce

By : Richard Jones
Book Image

Getting Started with Drupal Commerce

By: Richard Jones

Overview of this book

Drupal Commerce is emerging as the preferred option for open source e-commerce, and it also stands up to comparison against established proprietary systems. Getting Started with Drupal Commerce is an introductory guide to building an online store using Drupal Commerce in Drupal 7. Getting Started with Drupal Commerce takes you step-by-step through a complete e-commerce website build, from a clean installation of Drupal to a working example store. Starting with how to set up a Drupal development environment, we then discuss the planning of an e-commerce site and the typical questions you should be asking before getting started. Next, we walk through all of the essential setup required for most types of e-shop, including taxes, shipping, discounts and coupons, the checkout process, and backend order management. By the end of Getting Started with Drupal Commerce, you will be fully-equipped to plan and build your own store and you will understand the fundamental principles of Drupal Commerce that will enable you to progress to more complex store builds.
Table of Contents (18 chapters)
Getting Started with Drupal Commerce
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Site-wide discounts


In our first scenario, we will offer 10 percent off on all of our selling prices throughout the site.

To achieve this, we can create a pricing rule similar to those used earlier for calculating taxes. From the toolbar, navigate to Store | Configuration | Product pricing rules. Click on Add pricing rule.

Add an action to the new rule, named Multiply Unit Price by Some Amount.

Multiplying the unit price by 0.9 is the same as a 10 percent discount.

The final price is made up of multiple components. We can either use this rule to override the base price or we can add the discount as a separate component.

If the calculation leads to a partial currency unit, we can determine what action to take. The default is Round the half up, but different countries have different rules of how this should apply.

Our product which was originally £9 is now shown as £8.10 +VAT.