From 85de4835d545f6ccdae623854ac2af7f42059b1c Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Tue, 18 Aug 2020 14:37:46 +0300 Subject: [PATCH] fixes custom and config path (#188) --- .../catalog/controller/extension/module/retailcrm.php | 6 ++++++ src/upload/system/library/retailcrm/cron/dispatch.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/upload/catalog/controller/extension/module/retailcrm.php b/src/upload/catalog/controller/extension/module/retailcrm.php index 6be57af..d25178b 100644 --- a/src/upload/catalog/controller/extension/module/retailcrm.php +++ b/src/upload/catalog/controller/extension/module/retailcrm.php @@ -59,6 +59,9 @@ class ControllerExtensionModuleRetailcrm extends Controller { if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/order.php')) { $this->load->model('extension/retailcrm/custom/order'); + $order_data['products'] = $products; + $order_data['totals'] = $totals; + $order = $this->model_extension_retailcrm_custom_order->processOrder($order_data); $this->model_extension_retailcrm_custom_order->sendToCrm($order, $this->retailcrmApiClient, $order_data); } else { @@ -111,6 +114,9 @@ class ControllerExtensionModuleRetailcrm extends Controller { if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/order.php')) { $this->load->model('extension/retailcrm/custom/order'); + $data['products'] = $products; + $data['totals'] = $totals; + $order = $this->model_extension_retailcrm_custom_order->processOrder($data, false); $this->model_extension_retailcrm_custom_order->sendToCrm($order, $this->retailcrmApiClient, $data, false); } else { diff --git a/src/upload/system/library/retailcrm/cron/dispatch.php b/src/upload/system/library/retailcrm/cron/dispatch.php index 98987d1..083f418 100644 --- a/src/upload/system/library/retailcrm/cron/dispatch.php +++ b/src/upload/system/library/retailcrm/cron/dispatch.php @@ -22,7 +22,7 @@ if (isset($versionMatches[1])) { define('VERSION', $version); // Configuration (note we're using the admin config) -require_once(realpath(dirname(__FILE__)) . '/../../admin/config.php'); +require_once(realpath(dirname(__FILE__)) . '/../../../../admin/config.php'); // Configuration check if (!defined('DIR_APPLICATION')) {