Skip to content

Commit

Permalink
fixes custom and config path (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
iyzoer authored Aug 18, 2020
1 parent d73219f commit 85de483
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/upload/catalog/controller/extension/module/retailcrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public function order_create($trigger, $data, $order_id = null) {

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 {
Expand Down Expand Up @@ -111,6 +114,9 @@ public function order_edit($trigger, $parameter2 = null) {

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 {
Expand Down
2 changes: 1 addition & 1 deletion src/upload/system/library/retailcrm/cron/dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
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')) {
Expand Down

0 comments on commit 85de483

Please sign in to comment.