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

Commit d2a0de8

Browse files
authored
Removed dependency to configurable product
1 parent 2717cb1 commit d2a0de8

File tree

1 file changed

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

1 file changed

+1
-3
lines changed

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

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

8-
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
9-
108
/**
119
* Product rule condition data model
1210
*
@@ -47,7 +45,7 @@ protected function getProductToValidate(\Magento\Framework\Model\AbstractModel $
4745
$attrCode = $this->getAttribute();
4846

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

0 commit comments

Comments
 (0)