public function calculate(LineItemCollection
$discountLineItems, Cart
$original, Cart
$calculated, SalesChannelContext
$context, CartBehavior
$behaviour): void
{ // array that holds all excluded promotion ids.
// if a promotion has exclusions they are added on the stack
$exclusions =
$this->
buildExclusions($discountLineItems,
$calculated,
$context);
// @todo order $discountLineItems by priority
foreach ($discountLineItems as $discountItem) { // if we dont have a scope
// then skip it, it might not belong to us
if (!
$discountItem->
hasPayloadValue('discountScope'
)) { continue;
} // deliveries have their own processor and calculator