mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-22 13:16:07 +03:00
check of paid order
This commit is contained in:
parent
1ffbd61162
commit
95152eebd7
@ -171,6 +171,7 @@ class ModelExtensionRetailcrmOrder extends Model {
|
|||||||
|
|
||||||
$this->load->model('setting/setting');
|
$this->load->model('setting/setting');
|
||||||
$settings = $this->model_setting_setting->getSetting('retailcrm');
|
$settings = $this->model_setting_setting->getSetting('retailcrm');
|
||||||
|
$settingPaid = $this->model_setting_setting->getSetting($order_data['payment_code']);
|
||||||
|
|
||||||
if(!empty($settings['retailcrm_url']) && !empty($settings['retailcrm_apikey'])) {
|
if(!empty($settings['retailcrm_url']) && !empty($settings['retailcrm_apikey'])) {
|
||||||
$this->load->model('catalog/product');
|
$this->load->model('catalog/product');
|
||||||
@ -296,6 +297,10 @@ class ModelExtensionRetailcrmOrder extends Model {
|
|||||||
$order['status'] = $settings['retailcrm_status'][$order_data['order_status_id']];
|
$order['status'] = $settings['retailcrm_status'][$order_data['order_status_id']];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($order_data['order_status_id'] == $settingPaid[$order_data['payment_code'] . '_order_status_id']) {
|
||||||
|
$order['paymentStatus'] = 'paid';
|
||||||
|
}
|
||||||
|
|
||||||
$this->retailcrm->ordersEdit($order);
|
$this->retailcrm->ordersEdit($order);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user