Skip to content

Commit

Permalink
fixup! added checkOrder to Convertim
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasLudvik committed Dec 19, 2024
1 parent 6e7e088 commit d6a3e71
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Model/Order/ConvertimOrderDataToCartMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d6a3e71

Please sign in to comment.