Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit fae98c0

Browse files
committed
#14020-Cart-Sales-Rule-with-negated-condition-over-special-price-does-not-work-for-configurable-products.
Revert "Removed dependency to configurable product" This reverts commit d2a0de8.
1 parent d2a0de8 commit fae98c0

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/SalesRule/Model/Rule/Condition

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\SalesRule\Model\Rule\Condition;
77

8+
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
9+
810
/**
911
* Product rule condition data model
1012
*
@@ -45,7 +47,7 @@ protected function getProductToValidate(\Magento\Framework\Model\AbstractModel $
4547
$attrCode = $this->getAttribute();
4648

4749
/* Check for attributes which are not available for configurable products */
48-
if ($product->isComposite() && !$product->hasData($attrCode)) {
50+
if ($product->getTypeId() == Configurable::TYPE_CODE && !$product->hasData($attrCode)) {
4951
/** @var \Magento\Catalog\Api\Data\ProductInterface $childProduct */
5052
$childProduct = current($model->getChildren())->getProduct();
5153
if ($childProduct->hasData($attrCode)) {

0 commit comments

Comments
 (0)