mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-24 06:06:06 +03:00
Changing the connection to bootstrap.php (#229)
This commit is contained in:
parent
4e09c021c8
commit
d058173aa4
@ -265,25 +265,26 @@ class ModelExtensionRetailcrmOrder extends Model {
|
||||
if (isset($properties)) $item['properties'] = $properties;
|
||||
|
||||
$order['items'][] = $item;
|
||||
}
|
||||
|
||||
if (isset($order_data['order_status_id']) && $order_data['order_status_id'] > 0) {
|
||||
$order['status'] = $this->settings[$this->moduleTitle . '_status'][$order_data['order_status_id']];
|
||||
} elseif (isset($order_data['order_status_id']) && $order_data['order_status_id'] == 0) {
|
||||
$order['status'] = $this->settings[$this->moduleTitle . '_missing_status'];
|
||||
|
||||
if (isset($order_data['order_status_id']) && $order_data['order_status_id'] > 0) {
|
||||
$order['status'] = $this->settings[$this->moduleTitle . '_status'][$order_data['order_status_id']];
|
||||
} elseif (isset($order_data['order_status_id']) && $order_data['order_status_id'] == 0) {
|
||||
$order['status'] = $this->settings[$this->moduleTitle . '_missing_status'];
|
||||
}
|
||||
|
||||
if (isset($this->settings[$this->moduleTitle . '_custom_field']) && $order_data['custom_field']) {
|
||||
$customFields = $order_data['custom_field'];
|
||||
|
||||
foreach ($customFields as $key => $value) {
|
||||
if (isset($this->settings[$this->moduleTitle . '_custom_field']['o_' . $key])) {
|
||||
$customFieldsToCrm[$this->settings[$this->moduleTitle . '_custom_field']['o_' . $key]] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->settings[$this->moduleTitle . '_custom_field']) && $order_data['custom_field']) {
|
||||
$customFields = $order_data['custom_field'];
|
||||
|
||||
foreach ($customFields as $key => $value) {
|
||||
if (isset($this->settings[$this->moduleTitle . '_custom_field']['o_' . $key])) {
|
||||
$customFieldsToCrm[$this->settings[$this->moduleTitle . '_custom_field']['o_' . $key]] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($customFieldsToCrm)) {
|
||||
$order['customFields'] = $customFieldsToCrm;
|
||||
}
|
||||
if (isset($customFieldsToCrm)) {
|
||||
$order['customFields'] = $customFieldsToCrm;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ use retailcrm\factory\OrderConverterFactory;
|
||||
use retailcrm\factory\CustomerConverterFactory;
|
||||
use retailcrm\service\SettingsManager;
|
||||
|
||||
require_once 'bootstrap.php';
|
||||
require_once DIR_SYSTEM . 'library/retailcrm/bootstrap.php';
|
||||
|
||||
class Retailcrm {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user