Commerce Loyalty Condition adds a promotion condition that matches customers by their own order history rather than by the order in front of them. Use it to reward returning customers: a discount from the third order onwards, free shipping for anyone who has spent over a threshold, an offer aimed at customers who bought recently.
The condition is called Limit by number of orders and appears under the Customer tab wherever Drupal Commerce offers conditions on an order. It takes three settings, and the last two are optional:
- How many completed orders the customer must already have.
- A time window, so that only orders completed within the last N days count. Leave it empty to count the customer's whole history.
- A minimum total, so those orders must add up to at least a given amount. The comparison is inclusive.
Two things worth knowing before configuring it. Only completed orders are counted, so carts and other drafts are ignored. And the condition never matches a guest checkout, because every guest shares the anonymous user account and would otherwise inherit the order history of everyone who checked out without one.
Requirements
- Drupal 10 or 11
- Drupal Commerce 2.40 or 3.x
Full documentation is in the README. Bug reports and feature requests are welcome in the issue queue.
Depends on
Dependencies of the latest stable release
- Commerce Core commerce_order
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | Aug 28, 2026 |