From d6a3e71dc963f7d459af261bd5f70a324f8f96d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=CC=81s=CC=8C=20Ludvik?= Date: Thu, 19 Dec 2024 11:31:01 +0100 Subject: [PATCH] fixup! added checkOrder to Convertim --- src/Model/Order/ConvertimOrderDataToCartMapper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Model/Order/ConvertimOrderDataToCartMapper.php b/src/Model/Order/ConvertimOrderDataToCartMapper.php index b374d81..08283ea 100644 --- a/src/Model/Order/ConvertimOrderDataToCartMapper.php +++ b/src/Model/Order/ConvertimOrderDataToCartMapper.php @@ -99,7 +99,13 @@ protected function applyConvertimPaymentToCart(ConvertimOrderData $convertimOrde protected function applyConvertimTransportToCart(ConvertimOrderData $convertimOrderData, Cart $cart): void { $transport = $this->transportFacade->getByUuid($convertimOrderData->getTransportData()->getUuid()); - $cartTransportData = $this->cartTransportDataFactory->create($cart, $transport->getUuid(), $convertimOrderData->getTransportData()->getExtra()?->getPickUpPointCode()); + + $pickupPointIdentifier = null; + if ($transport->isPersonalPickup() || $transport->isPacketery()) { + $pickupPointIdentifier = $convertimOrderData->getTransportData()->getExtra()?->getPickUpPointCode(); + } + + $cartTransportData = $this->cartTransportDataFactory->create($cart, $transport->getUuid(), $pickupPointIdentifier); $cartTransportData->watchedPrice = Money::create($convertimOrderData->getTransportData()->getPriceWithVat()); $cart->editCartTransport($cartTransportData);