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 7
7
namespace Magento \SalesRule \Model ;
8
8
9
9
use Laminas \Validator \ValidatorInterface ;
10
+ use Magento \Catalog \Model \Product \Type ;
11
+ use Magento \ConfigurableProduct \Model \Product \Type \Configurable ;
10
12
use Magento \Framework \App \ObjectManager ;
11
13
use Magento \Framework \ObjectManager \ResetAfterRequestInterface ;
12
14
use Magento \Quote \Model \Quote ;
@@ -511,7 +513,8 @@ public function initTotals($items, Address $address)
511
513
*/
512
514
private function isValidItemForRule (AbstractItem $ item , Rule $ rule )
513
515
{
514
- if ($ item ->getParentItem () || $ item ->getParentItemId ()) {
516
+ if ($ item ->getProductType () === Type::TYPE_SIMPLE && $ item ->getParentItemId () != null
517
+ && $ item ->getParentItem ()->getProductType () === Configurable::TYPE_CODE ) {
515
518
return false ;
516
519
}
517
520
You can’t perform that action at this time.
0 commit comments