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'];
|
||||
else if ( $orlenPointData )
|
||||
$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';
|
||||
|
||||
if ( $order['client_city'] )
|
||||
@@ -526,7 +526,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
|
||||
$city = $paczkomatData['city'];
|
||||
else if ( $orlenPointData )
|
||||
$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';
|
||||
|
||||
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'];
|
||||
else if ( $orlenPointData )
|
||||
$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';
|
||||
|
||||
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 = [
|
||||
'idExternal' => $order['id'],
|
||||
'isInvoice' => $order['firm_name'] ? true : false,
|
||||
|
||||
Reference in New Issue
Block a user