Skip to content

Commit

Permalink
Merge pull request #748 from plentymarkets/fix/placorder
Browse files Browse the repository at this point in the history
check for deliveryAddressId > 0
  • Loading branch information
stentrop authored Feb 18, 2020
2 parents 9449a16 + 63c5191 commit e029f9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/PlaceOrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function placeOrder(
}

$deliveryAddressId = $basketService->getDeliveryAddressId();
if (!is_null($deliveryAddressId)) {
if (!is_null($deliveryAddressId) && $deliveryAddressId > 0) {
$deliveryAddressData = $customerService->getAddress($deliveryAddressId, AddressType::DELIVERY);
$vatOption = $deliveryAddressData->options->where('typeId', AddressOption::TYPE_VAT_NUMBER)->first();
if(!is_null($vatOption))
Expand Down

0 comments on commit e029f9a

Please sign in to comment.