Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Getting Started with Drupal Commerce

You're reading from   Getting Started with Drupal Commerce Learn everything you need to know in order to get your first Drupal Commerce website set up and trading

Arrow left icon
Product type Paperback
Published in Sep 2013
Publisher Packt
ISBN-13 9781783280230
Length 152 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Toc

Table of Contents (18) Chapters Close

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.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image