Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon
* @param \Magento\Catalog\Model\ResourceModel\Product $productResource
* @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $attrSetCollection
* @param \Magento\Framework\Locale\FormatInterface $localeFormat
* @param ProductCategoryList|null $categoryList
* @param array $data
* @param ProductCategoryList|null $categoryList
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
Expand Down Expand Up @@ -520,6 +520,10 @@ public function loadArray($arr)
) ? $this->_localeFormat->getNumber(
$arr['is_value_parsed']
) : false;
} elseif (!empty($arr['operator']) && $arr['operator'] == '()') {
if (isset($arr['value'])) {
$arr['value'] = preg_replace('/\s*,\s*/', ',', $arr['value']);
}
}

return parent::loadArray($arr);
Expand Down Expand Up @@ -706,6 +710,7 @@ protected function _getAttributeSetId($productId)

/**
* Correct '==' and '!=' operators
*
* Categories can't be equal because product is included categories selected by administrator and in their parents
*
* @return string
Expand Down