Dodanie obsługi błędów dla zamówień z transportem ORLEN PACZKA bez podanego punktu odbioru
This commit is contained in:
11
cron.php
11
cron.php
@@ -517,7 +517,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
|
|||||||
$street = $paczkomatData['address'];
|
$street = $paczkomatData['address'];
|
||||||
else if ( $orlenPointData )
|
else if ( $orlenPointData )
|
||||||
$street = $orlenPointData['address'];
|
$street = $orlenPointData['address'];
|
||||||
else if ( $order['transport_id'] == 3 )
|
else if ( $order['transport_id'] == 3 or ( $order['transport_id'] == 9 and $order['orlen_point'] == null ) )
|
||||||
$street = 'ul. Krakowska 156/104';
|
$street = 'ul. Krakowska 156/104';
|
||||||
|
|
||||||
if ( $order['client_city'] )
|
if ( $order['client_city'] )
|
||||||
@@ -526,7 +526,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
|
|||||||
$city = $paczkomatData['city'];
|
$city = $paczkomatData['city'];
|
||||||
else if ( $orlenPointData )
|
else if ( $orlenPointData )
|
||||||
$city = $orlenPointData['city'];
|
$city = $orlenPointData['city'];
|
||||||
else if ( $order['transport_id'] == 3 )
|
else if ( $order['transport_id'] == 3 or ( $order['transport_id'] == 9 and $order['orlen_point'] == null ) )
|
||||||
$city = 'Rzeszów';
|
$city = 'Rzeszów';
|
||||||
|
|
||||||
if ( $order['client_postal_code'] )
|
if ( $order['client_postal_code'] )
|
||||||
@@ -535,9 +535,14 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
|
|||||||
$postal_code = $paczkomatData['postalCode'];
|
$postal_code = $paczkomatData['postalCode'];
|
||||||
else if ( $orlenPointData )
|
else if ( $orlenPointData )
|
||||||
$postal_code = $orlenPointData['postalCode'];
|
$postal_code = $orlenPointData['postalCode'];
|
||||||
else if ( $order['transport_id'] == 3 )
|
else if ( $order['transport_id'] == 3 or ( $order['transport_id'] == 9 and $order['orlen_point'] == null ) )
|
||||||
$postal_code = '35-506';
|
$postal_code = '35-506';
|
||||||
|
|
||||||
|
if ( $order['transport_id'] == 9 and $order['orlen_point'] == null )
|
||||||
|
{
|
||||||
|
\S::send_email( 'biuro@project-pro.pl', 'Błąd integracji APILO - brak punktu ORLEN PACZKA', 'W zamówieniu #' . $order['id'] . ' wybrano dostawę ORLEN PACZKA, ale nie podano punktu odbioru. Proszę o uzupełnienie danych w panelu sklepu.' );
|
||||||
|
}
|
||||||
|
|
||||||
$postData = [
|
$postData = [
|
||||||
'idExternal' => $order['id'],
|
'idExternal' => $order['id'],
|
||||||
'isInvoice' => $order['firm_name'] ? true : false,
|
'isInvoice' => $order['firm_name'] ? true : false,
|
||||||
|
|||||||
Reference in New Issue
Block a user