// save all rules for later usage
$all =
$rules;
$ids =
$new ?
$rules->
getIds() :
$cart->
getRuleIds();
// update rules in current context
$context->
setRuleIds($ids);
$iteration = 1;
$timestamps =
$cart->
getLineItems()->
fmap(function DLineItem
$lineItem) { if ($lineItem->
getDataTimestamp() === null
) { return null;
} return $lineItem->
getDataTimestamp()->
format(Defaults::STORAGE_DATE_TIME_FORMAT
);
});
// start first cart calculation to have all objects enriched
$cart =
$this->processor->
process($cart,
$context,
$behaviorContext);
do { $compare =
$cart;