From a1a85e84891ca0bf2ca96593496125ce8c799da7 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Sun, 26 Oct 2025 23:16:40 +0100 Subject: [PATCH] =?UTF-8?q?Dodanie=20obs=C5=82ugi=20b=C5=82=C4=99d=C3=B3w?= =?UTF-8?q?=20dla=20integracji=20z=20APILO=20w=20przypadku=20braku=20punkt?= =?UTF-8?q?u=20ORLEN=20PACZKA=20w=20zam=C3=B3wieniu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cron.php | 13 ++++++++++--- templates_user/.DS_Store | Bin 0 -> 6148 bytes templates_user/components/.DS_Store | Bin 0 -> 6148 bytes 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 templates_user/.DS_Store create mode 100644 templates_user/components/.DS_Store diff --git a/cron.php b/cron.php index a8fb16e..0a4e56b 100644 --- a/cron.php +++ b/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(); $order_date = new DateTime( $order['date_order'] ); + $paczkomatData = parsePaczkomatAddress( $order['inpost_paczkomat'] ); $orlenPointData = parseOrlenAddress( $order['orlen_point'] ); @@ -516,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'] ) @@ -525,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'] ) @@ -534,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, @@ -707,6 +713,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se if ( $responseData['id'] and $responseData['status'] ) { $shop_status_id = \front\factory\ShopStatuses::get_shop_status_by_integration_status_id( 'apilo', $responseData['status'] ); + $order_tmp = new Order( $order['id'] ); if ( $shop_status_id ) diff --git a/templates_user/.DS_Store b/templates_user/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..dbd07c1a1c1d289c1b490405a326e8a55ae29325 GIT binary patch literal 6148 zcmeHKJ8r^25S>XVP-t9I?iIMf%5qNN3m_#C4KXMr)UI+aj>emhq98+&f+l(+&Ai>& zd29I<9*>A<`}MjKX+&fWH%Fk~B9M^^Pys6Nqkw%M3f!hP6`=yd49* i9b;qdc*nm7hJ9eJk%`7>a;(5S$@6*vQa;1$mR literal 0 HcmV?d00001 diff --git a/templates_user/components/.DS_Store b/templates_user/components/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0