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.
Once you're logged in, follow these steps to add a percentage-off promotion to your Drupal Commerce store:
Navigate to Store settings | Discounts, and you will see the Discounts screen.
Click on the Add discount button towards the top-left corner of your screen:
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:
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.
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:
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:
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.