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
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:
-
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).
-
Go to Stores > Attributes > Attribute Set and add the three attributes to the Default attribute set.
-
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.
-
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 -
Go to Catalog > Categories, add a new category, and click Save.
-
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 | -
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:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide