Merge branch 'main' of http://91.189.216.43:3000/jacek.pyziak/pomysloweprezenty.pl
This commit is contained in:
13
cron.php
13
cron.php
@@ -503,6 +503,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
|
|||||||
$access_token = \admin\factory\Integrations::apilo_get_access_token();
|
$access_token = \admin\factory\Integrations::apilo_get_access_token();
|
||||||
|
|
||||||
$order_date = new DateTime( $order['date_order'] );
|
$order_date = new DateTime( $order['date_order'] );
|
||||||
|
|
||||||
$paczkomatData = parsePaczkomatAddress( $order['inpost_paczkomat'] );
|
$paczkomatData = parsePaczkomatAddress( $order['inpost_paczkomat'] );
|
||||||
$orlenPointData = parseOrlenAddress( $order['orlen_point'] );
|
$orlenPointData = parseOrlenAddress( $order['orlen_point'] );
|
||||||
|
|
||||||
@@ -516,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'] )
|
||||||
@@ -525,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'] )
|
||||||
@@ -534,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,
|
||||||
@@ -707,6 +713,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se
|
|||||||
if ( $responseData['id'] and $responseData['status'] )
|
if ( $responseData['id'] and $responseData['status'] )
|
||||||
{
|
{
|
||||||
$shop_status_id = \front\factory\ShopStatuses::get_shop_status_by_integration_status_id( 'apilo', $responseData['status'] );
|
$shop_status_id = \front\factory\ShopStatuses::get_shop_status_by_integration_status_id( 'apilo', $responseData['status'] );
|
||||||
|
|
||||||
$order_tmp = new Order( $order['id'] );
|
$order_tmp = new Order( $order['id'] );
|
||||||
|
|
||||||
if ( $shop_status_id )
|
if ( $shop_status_id )
|
||||||
|
|||||||
BIN
templates_user/.DS_Store
vendored
Normal file
BIN
templates_user/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
templates_user/components/.DS_Store
vendored
Normal file
BIN
templates_user/components/.DS_Store
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user