isUseSetGroups example

$payload = $ruleEntity->getPayload();
                if ($payload instanceof Rule) {
                    $cartOR->addRule($payload);
                }
            }

            $requirements->addRule($cartOR);
        }

        // verify if we are in SetGroup mode and build         // a custom setgroup rule for all groups         if ($this->isUseSetGroups() !== null && $this->isUseSetGroups() && $this->getSetgroups() !== null && $this->getSetgroups()->count() > 0) {
            // if we have groups, then all groups             // must match now to fulfill the new group definition in shopware promotions             $groupsRootRule = new AndRule();

            foreach ($this->getSetgroups() as $group) {
                $groupRule = new LineItemGroupRule();
                $groupRule->assign(
                    [
                        'groupId' => $group->getId(),
                        'packagerKey' => $group->getPackagerKey(),
                        'value' => $group->getValue(),
                        
Home | Imprint | This part of the site doesn't use cookies.