Summen

Berechnung der Summen einer Bestellung

$positions = new \Alvine\Types\Collection(\Alvine\Application\Platform\Plugin\Commerce\Order\ImmutablePosition::class);
$factoryClass = \Alvine\Application\Platform\Plugin\Order\Component::getInstance()->getSummaryStrategyFactoryClass();
$factory=new $factoryClass();
$factory->setPositionCollection($order->getPositions());
$strategy=$factory->create();
$totalAmounts=$this->strategy->calc();

Die Summery Klasse kapselt diese Aufrufe

$summary=new \Alvine\Application\Platform\Plugin\Order\Summary($order);