We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc81559 commit a239900Copy full SHA for a239900
app/code/Magento/ConfigurableProduct/Plugin/SalesRule/Model/Rule/Condition/Product.php
@@ -26,8 +26,13 @@ public function beforeValidate(
26
) {
27
$product = $this->getProductToValidate($subject, $model);
28
if ($model->getProduct() !== $product) {
29
- $model->setProduct($product);
+ // We need to replace product only for validation and keep original product for all other cases.
30
+ $clone = clone $model;
31
+ $clone->setProduct($product);
32
+ $model = $clone;
33
}
34
+
35
+ return [$model];
36
37
38
/**
0 commit comments