Checkout rules
One of the major dependencies of Drupal Commerce is the Rules module.
Rules is a powerful and highly configurable system of events, conditions, and actions which make the progress of the order possible.
There are a number of default checkout rules defined, which we can use to illustrate how Rules work, using the following steps:
From the toolbar, navigate to Store | Configuration | Checkout settings.
Then click onto the CHECKOUT RULES tab, as shown in the following screenshot:
How a rule works
Click on edit on the first rules.
A rule consists of one or more Events, which will start the rule when they occur. In this case, the event is Completing the checkout process. Drupal Commerce will trigger this event when the customer completes the last pane in the checkout process.
Next, the rules will evaluate the Conditions to determine if the rule should continue. These conditions are extensive, but in this case, we want this rule to run every time.
Finally, the rules will fire one or more...