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);