order = $order; parent::__construct($currency); } protected function initialize(): void { foreach ($this->order->getOrderProductsJoinProduct() as $orderProduct) { $this->addAmountWithCurrency($orderProduct->getTotalAmount(true, true)); $this->addWeight($orderProduct->getTotalWeight()); $this->addQuantity($orderProduct->getQuantity()); $this->addDimensions($orderProduct->getWidth(), $orderProduct->getHeight(), $orderProduct->getDepth(), $orderProduct->getQuantity()); $this->addDeliveryPrice($orderProduct->getTotalDeliveryPrice()); $this->addMaxTax($orderProduct->getTax()); if (!empty($orderProduct->getProduct()->getDeliveries())) { $this->addAllowedDeliveries($orderProduct->getProduct()->getDeliveries()); } } } }