From b8296c0e99a8b5bb93c3b0cf911d07cadee005e5 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Tue, 19 Nov 2024 12:48:56 +0100 Subject: [PATCH] =?UTF-8?q?Poprawa=20logiki=20przypisywania=20adresu=20kli?= =?UTF-8?q?enta=20w=20cron.php,=20aby=20uwzgl=C4=99dni=C4=87=20miasto=20i?= =?UTF-8?q?=20kod=20pocztowy=20z=20r=C3=B3=C5=BCnych=20=C5=BAr=C3=B3de?= =?UTF-8?q?=C5=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cron.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/cron.php b/cron.php index 425394c..01a9ab6 100644 --- a/cron.php +++ b/cron.php @@ -510,24 +510,27 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se $street = ''; $city = ''; $postal_code = ''; + if ( $order['client_street'] ) - { $street = $order['client_street']; - $city = $order['client_city']; - $postal_code = $order['client_postal_code']; - } else if ( $paczkomatData ) - { $street = $paczkomatData['address']; - $city = $paczkomatData['city']; - $postal_code = $paczkomatData['postalCode']; - } else if ( $orlenPointData ) - { $street = $orlenPointData['address']; + + if ( $order['client_city'] ) + $city = $order['client_city']; + else if ( $paczkomatData ) + $city = $paczkomatData['city']; + else if ( $orlenPointData ) $city = $orlenPointData['city']; + + if ( $order['client_postal_code'] ) + $postal_code = $order['client_postal_code']; + else if ( $paczkomatData ) + $postal_code = $paczkomatData['postalCode']; + else if ( $orlenPointData ) $postal_code = $orlenPointData['postalCode']; - } $postData = [ 'idExternal' => $order['id'],