From 5308142ad53497aa6256a573057281550e6cf83a Mon Sep 17 00:00:00 2001 From: Gytautas Date: Tue, 28 Nov 2023 14:26:56 +0200 Subject: [PATCH] fix: street setter bug fix --- src/Service/API/ShipmentApiService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/API/ShipmentApiService.php b/src/Service/API/ShipmentApiService.php index 3b2e5e7..9c40edb 100644 --- a/src/Service/API/ShipmentApiService.php +++ b/src/Service/API/ShipmentApiService.php @@ -108,6 +108,7 @@ public function createShipment($addressId, ShipmentData $shipmentData, $orderId) $parcel = $this->parcelShopService->getParcelShopByShopId($shipmentData->getSelectedPudoId()); $selectedParcel = is_array($parcel) ? reset($parcel) : $parcel; $postCode = $selectedParcel->getPCode(); + $address->address1 = $selectedParcel->getStreet(); } // IF prestashop allows, we take selected parcel terminal address in case information is missing in checkout address in specific cases. @@ -237,7 +238,6 @@ private function setNotRequiredData(ShipmentCreationRequest $shipmentCreationReq private function setPudoData(ShipmentCreationRequest $shipmentCreationRequest, ShipmentData $shipmentData) { $shipmentCreationRequest->setParcelShopId($shipmentData->getSelectedPudoId()); - $shipmentCreationRequest->setStreet($shipmentData->getDpdStreet()); return $shipmentCreationRequest; }