ACP2E-5061:类别促销规则无法将AND条件与匹配多个值的条件组合在一起

ACP2E-5061修补程序修复了类别促销规则无法将AND条件与匹配多个值中任意值的条件结合的问题。 安装Quality Patches Tool (QPT) 1.1.86时,此修补程序可用。 修补程序ID为ACP2E-5061。 请注意,此问题计划在Adobe Commerce 2.4.10中修复。

受影响的产品和版本

为Adobe Commerce版本创建了修补程序:

  • Adobe Commerce(所有部署方法) 2.4.7-p5

与Adobe Commerce版本兼容:

  • Adobe Commerce(所有部署方法) 2.4.5 - 2.4.9
NOTE
该修补程序可能适用于具有新Quality Patches Tool发行版本的其他版本。 要检查修补程序是否与您的Adobe Commerce版本兼容,请将magento/quality-patches包更新到最新版本,并在Quality Patches Tool:搜索修补程序页面上检查兼容性。 使用修补程序ID作为搜索关键字来查找修补程序。

问题

类别促销规则不能将AND条件与匹配多个值中任意值的条件组合在一起。

重现步骤:

  1. 在“管理”面板中,转到​Stores > Attributes > Product,单击​Add New Attribute,然后创建三个产品属性,其中​ Scope ​设置为​全局: 类别组 (Dropdown,选项为​金)、产品令牌 (Dropdown,选项为​ 圆角 ​和​指环),以及​场合规则 (Text Field)。

  2. 转到​Stores > Attributes > Attribute Set​并将这三个属性添加到​ Default ​属性集。

  3. 转到​Stores > Settings > Configuration > Catalog > Visual Merchandiser > General Options,将​类别组、产品令牌​和​ 场合规则 ​添加到​Visible Attributes for Category Rules,然后单击​Save Config。

  4. 转到​Catalog > Products,在​ Default ​属性集中创建六个使用以下值的简单产品:

    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. 转到​Catalog > Categories,添加新类别,然后单击​Save。

  6. 在保存的类别中,展开​Products in Category,将​ Match products by rule ​设置为​是,并使用​ Add Condition ​添加这些条件:

    code language-none
    Attribute       | Operator | Value         | Logic
    Category Group  | Equal    | Gold          | AND
    Product Token   | Equal    | Finger Ring   | AND
    Occasion Rule   | Contains | casual, party |
    
  7. 单击​ Save ​并检查分配给该类别的产品。

预期的结果:

simple3和simple4,即​金 指环​产品,其​ 场合规则 ​包含​ 休闲 ​或​派对,已分配给该类别。

实际结果:

没有产品被分配给该类别,因为​ Contains ​条件与​ casual, party ​匹配为一个文本值,而不是匹配任一搜索词。

应用修补程序

要应用单独的修补程序,请根据您的部署方法使用以下链接:

相关阅读

要了解有关Quality Patches Tool的更多信息,请参阅:

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