Skip to content

Commit

Permalink
bugfix when postcode is not available while creating shipment
Browse files Browse the repository at this point in the history
  • Loading branch information
arturas-bes committed Dec 21, 2021
1 parent 3eead0c commit f6884ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Service/API/ShipmentApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public function createShipment($addressId, ShipmentData $shipmentData, $orderId)
$dpdProduct = new DPDProduct($shipmentData->getProduct());
$parcelType = $dpdProduct->getProductReference();
$country = Country::getIsoById($address->id_country);
$postCode = $address->postcode;
$hasAddressFields = (bool) !$postCode || !$firstName || !$address->city || !$country;

// IF prestashop allows, we take selected parcel terminal address in case information is missing in checkout address in specific cases.
Expand Down

0 comments on commit f6884ad

Please sign in to comment.