fixes custom and config path (#188)

This commit is contained in:
Akolzin Dmitry 2020-08-18 14:37:46 +03:00 committed by GitHub
parent d73219fcbb
commit 85de4835d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -59,6 +59,9 @@ class ControllerExtensionModuleRetailcrm extends Controller {
if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/order.php')) { if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/order.php')) {
$this->load->model('extension/retailcrm/custom/order'); $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); $order = $this->model_extension_retailcrm_custom_order->processOrder($order_data);
$this->model_extension_retailcrm_custom_order->sendToCrm($order, $this->retailcrmApiClient, $order_data); $this->model_extension_retailcrm_custom_order->sendToCrm($order, $this->retailcrmApiClient, $order_data);
} else { } else {
@ -111,6 +114,9 @@ class ControllerExtensionModuleRetailcrm extends Controller {
if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/order.php')) { if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/order.php')) {
$this->load->model('extension/retailcrm/custom/order'); $this->load->model('extension/retailcrm/custom/order');
$data['products'] = $products;
$data['totals'] = $totals;
$order = $this->model_extension_retailcrm_custom_order->processOrder($data, false); $order = $this->model_extension_retailcrm_custom_order->processOrder($data, false);
$this->model_extension_retailcrm_custom_order->sendToCrm($order, $this->retailcrmApiClient, $data, false); $this->model_extension_retailcrm_custom_order->sendToCrm($order, $this->retailcrmApiClient, $data, false);
} else { } else {

View File

@ -22,7 +22,7 @@ if (isset($versionMatches[1])) {
define('VERSION', $version); define('VERSION', $version);
// Configuration (note we're using the admin config) // 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 // Configuration check
if (!defined('DIR_APPLICATION')) { if (!defined('DIR_APPLICATION')) {