Poprawa logiki przypisywania adresu klienta w cron.php, aby uwzględnić miasto i kod pocztowy z różnych źródeł
This commit is contained in:
23
cron.php
23
cron.php
@@ -510,24 +510,27 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
|
|||||||
$street = '';
|
$street = '';
|
||||||
$city = '';
|
$city = '';
|
||||||
$postal_code = '';
|
$postal_code = '';
|
||||||
|
|
||||||
if ( $order['client_street'] )
|
if ( $order['client_street'] )
|
||||||
{
|
|
||||||
$street = $order['client_street'];
|
$street = $order['client_street'];
|
||||||
$city = $order['client_city'];
|
|
||||||
$postal_code = $order['client_postal_code'];
|
|
||||||
}
|
|
||||||
else if ( $paczkomatData )
|
else if ( $paczkomatData )
|
||||||
{
|
|
||||||
$street = $paczkomatData['address'];
|
$street = $paczkomatData['address'];
|
||||||
$city = $paczkomatData['city'];
|
|
||||||
$postal_code = $paczkomatData['postalCode'];
|
|
||||||
}
|
|
||||||
else if ( $orlenPointData )
|
else if ( $orlenPointData )
|
||||||
{
|
|
||||||
$street = $orlenPointData['address'];
|
$street = $orlenPointData['address'];
|
||||||
|
|
||||||
|
if ( $order['client_city'] )
|
||||||
|
$city = $order['client_city'];
|
||||||
|
else if ( $paczkomatData )
|
||||||
|
$city = $paczkomatData['city'];
|
||||||
|
else if ( $orlenPointData )
|
||||||
$city = $orlenPointData['city'];
|
$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'];
|
$postal_code = $orlenPointData['postalCode'];
|
||||||
}
|
|
||||||
|
|
||||||
$postData = [
|
$postData = [
|
||||||
'idExternal' => $order['id'],
|
'idExternal' => $order['id'],
|
||||||
|
|||||||
Reference in New Issue
Block a user