Promotion Condition - Specified Product Quantity in Cart

Created on 28 February 2025, about 1 month ago

Problem/motivation:

Currently it is not possible to create this very simple rule with the promotions module:
If you buy at least 2 pcs of a specified product, you will get X USD discount of each matching product.
E.g. 1 pcs product costs $10 but if you buy at least 2 pcs (2, 3, 4, .... etc) you will get all of these for $8/pcs

Solution

In the Promotions module of Drupal Commerce, when adding a promotion, there is a strong need for a new condition under the conditions section:

"If there are X units of a specific product in the cart."

Ideally, X should be adjustable with relational operators, such as:

  • Less than
  • More than
  • At least X but less than Y
  • etc.

This feature would allow setting up discounts that only apply when a customer purchases e.g. a minimum quantity of a specific product. E.g. If you buy at least 2 pcs of a specified product, you will get X USD discount of each matching product.

Currently, the conditions section allows checking:

  • The total number of "some" products in the cart
  • Whether a specific product is in the cart

However, it does not provide an option to check if a specific product meets the required quantity for a discount to apply.

This enhancement would provide greater flexibility in defining promotions and ensure that discounts are granted only when a specified quantity of a product is purchased.

Feature request
Status

Active

Version

3.0

Component

Promotions

Created by

🇭🇺Hungary kepesv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024