File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
app/code/Magento/SalesRule/Model Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 77namespace Magento \SalesRule \Model ;
88
99use Laminas \Validator \ValidatorInterface ;
10+ use Magento \Catalog \Model \Product \Type ;
11+ use Magento \ConfigurableProduct \Model \Product \Type \Configurable ;
1012use Magento \Framework \App \ObjectManager ;
1113use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
1214use Magento \Quote \Model \Quote ;
@@ -511,7 +513,8 @@ public function initTotals($items, Address $address)
511513 */
512514 private function isValidItemForRule (AbstractItem $ item , Rule $ rule )
513515 {
514- if ($ item ->getParentItem () || $ item ->getParentItemId ()) {
516+ if ($ item ->getProductType () === Type::TYPE_SIMPLE && $ item ->getParentItemId () != null
517+ && $ item ->getParentItem ()->getProductType () === Configurable::TYPE_CODE ) {
515518 return false ;
516519 }
517520
You can’t perform that action at this time.
0 commit comments