Skip to content

Commit 16c3d57

Browse files
authored
ENGCOM-4149: Fixed issue if there are multiple skus in catalog rule condition combination #20923
2 parents 3938e68 + a065d2d commit 16c3d57

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon
9595
* @param \Magento\Catalog\Model\ResourceModel\Product $productResource
9696
* @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $attrSetCollection
9797
* @param \Magento\Framework\Locale\FormatInterface $localeFormat
98-
* @param ProductCategoryList|null $categoryList
9998
* @param array $data
99+
* @param ProductCategoryList|null $categoryList
100100
*
101101
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
102102
*/
@@ -514,6 +514,10 @@ public function loadArray($arr)
514514
) ? $this->_localeFormat->getNumber(
515515
$arr['is_value_parsed']
516516
) : false;
517+
} elseif (!empty($arr['operator']) && $arr['operator'] == '()') {
518+
if (isset($arr['value'])) {
519+
$arr['value'] = preg_replace('/\s*,\s*/', ',', $arr['value']);
520+
}
517521
}
518522

519523
return parent::loadArray($arr);
@@ -695,6 +699,7 @@ protected function _getAttributeSetId($productId)
695699

696700
/**
697701
* Correct '==' and '!=' operators
702+
*
698703
* Categories can't be equal because product is included categories selected by administrator and in their parents
699704
*
700705
* @return string

0 commit comments

Comments
 (0)