ACP2E-5061: Category merchandising rule can’t combine AND conditions with condition that matches several values

The ACP2E-5061 patch fixes the issue where a category merchandising rule cannot combine AND conditions with a condition that matches any of several values. This patch is available when the Quality Patches Tool (QPT) 1.1.86 is installed. The patch ID is ACP2E-5061. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.10.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.7-p5

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.5 - 2.4.9
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

A category merchandising rule cannot combine AND conditions with a condition that matches any of several values.

Steps to reproduce:

  1. In the Admin panel, go to Stores > Attributes > Product, click Add New Attribute, and create three product attributes with Scope set to Global: Category Group (Dropdown with the option Gold), Product Token (Dropdown with the options Bangle and Finger Ring), and Occasion Rule (Text Field).

  2. Go to Stores > Attributes > Attribute Set and add the three attributes to the Default attribute set.

  3. Go to Stores > Settings > Configuration > Catalog > Visual Merchandiser > General Options, add Category Group, Product Token, and Occasion Rule to Visible Attributes for Category Rules, and click Save Config.

  4. Go to Catalog > Products and create six simple products in the Default attribute set with these values:

    code language-none
    SKU      | Category Group | Product Token | Occasion Rule
    simple1  | Gold           | Bangle        | CASUAL WEAR,PARTY WEAR
    simple2  | Gold           | Bangle        | PARTY WEAR
    simple3  | Gold           | Finger Ring   | FOR PARTY
    simple4  | Gold           | Finger Ring   | SUITABLE FOR CASUAL
    simple5  | Gold           | Finger Ring   | THIS IS TEST
    simple6  | Gold           | Bangle        | DAY PARTY
    
  5. Go to Catalog > Categories, add a new category, and click Save.

  6. In the saved category, expand Products in Category, set Match products by rule to Yes, and use Add Condition to add these conditions:

    code language-none
    Attribute       | Operator | Value         | Logic
    Category Group  | Equal    | Gold          | AND
    Product Token   | Equal    | Finger Ring   | AND
    Occasion Rule   | Contains | casual, party |
    
  7. Click Save and check the products assigned to the category.

Expected results:

simple3 and simple4, the Gold Finger Ring products whose Occasion Rule contains casual or party, are assigned to the category.

Actual results:

No products are assigned to the category, because the Contains condition matches casual, party as one literal value instead of matching either term.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
commerce-operations-help-tools