File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
app/code/Magento/SalesRule/Model/Rule/Condition Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 55 */
66namespace 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 )) {
You can’t perform that action at this time.
0 commit comments