Create an option to negate conditions

Created on 21 February 2018, over 6 years ago
Updated 15 October 2023, about 1 year ago

As mentioned in the commerce shipping issue here . It would make sense to be able to negate conditions.

As @bojanz already mentioned there:

A harder but more universal fix would be to add negating as a general condition concept. We've had problems figuring out the right UX for that, so we decided to postpone until we see how people are using conditions (and until we fully implement all of the planned conditions).
Feature request
Status

Active

Version

2.0

Component

Commerce

Created by

🇩🇪Germany bbuchert

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States DamienMcKenna NH, USA

    I've just tested Commerce Conditions Plus and it does solve this use case and gives a lot more flexibility to the system. Great work!

    The only question is how to promote this module to site builders that need more flexibility, so they're aware of the functionality?

  • 🇮🇹Italy finex

    @DamienMcKenna: it could be added on the main Commerce Core page in the "Additional functionality is provided ..." paragraph.

  • 🇮🇹Italy gatiba

    Hi everyone,
    first of all sorry for my very bad english.
    Our case is different, we are trying but without success to replicate the behavior of coupons as happened in Drupal 7 Commerce 1.

    In fact, we would like to be able to negate a "Percentage off each matching product" type discount (ex: -10%) to certain product categories (e.g. CAT1) but without this preventing the application of the coupon: simply as in commerce 1, applying the coupon, all products in the cart in those negated categories (CAT1) must NOT be discounted, the others yes.

    Is it possible to achieve this type of result today with Commerce 2?
    In fact, we have around 40 product categories, and we should only exclude 3 or 4 of them, not be forced to include all the other 37 in every discount rules of every promotion with a coupon.

    Even worse if you want to exclude specific products (we have almost 3,000 and would like to exclude 4 or 5 of them from the discount on certain coupons).

    We also tried the " commerce conditions plus " module with the patch to negate the condition rules, but these rules are based on the "Order contains specific products" or "Order contains product categories" logic, completely preventing the application of the coupon, and not limiting itself to applying the discount to (if any) discountable products.

    Thanks in advance, unfortunately this is an e-commerce that for years has run on Drupal 7 and commerce 1 without problems, and only now we have realized that we are unable to replicate the discount/coupon rules on Commerce 2, and we are now in a very bad situation...

Production build 0.71.5 2024