Add negate and and/or functionality to order product condition

Created on 13 March 2019, almost 6 years ago
Updated 9 October 2024, 2 months ago

With the inactivity in creating a general solution for negating conditions Create an option to negate conditions Active , patches are required to do so for any project that needs the functionality. After creating a patch for the shipping address condition in #2916954: Add a negate option to the ShipmentAddress condition , I was asked to create one for the Order Product conditions. I will provide a patch that additionally adds a choice of operator (and/or) and combines the operator and negation into select options, for better UX/understanding of non-technical users, as shown in the attached screenshots.

Feature request
Status

Needs work

Version

2.0

Component

Product

Created by

🇬🇷Greece s.messaris

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.

  • 🇹🇷Turkey rgnyldz

    The latest patch is giving an error like below.

    Deprecated function: Creation of dynamic property Drupal\commerce_product\Plugin\Commerce\Condition\OrderProduct::$productStorage is deprecated in Drupal\commerce_product\Plugin\Commerce\Condition\OrderProduct->__construct() (line 45 of /home/xxx/public_html/xxx.com/web/modules/contrib/commerce/modules/product/src/Plugin/Commerce/Condition/OrderProduct.php)

  • Assigned to Spoting
Production build 0.71.5 2024