added custom folder for catalog model

This commit is contained in:
iyzoer 2017-09-01 17:19:38 +03:00
parent 3841072727
commit e69c4c11d9
2 changed files with 28 additions and 8 deletions

View File

@ -44,8 +44,13 @@ class ControllerExtensionModuleRetailcrm extends Controller
$data['order_status'] = $status[$moduleTitle . '_status'][$data['order_status_id']]; $data['order_status'] = $status[$moduleTitle . '_status'][$data['order_status_id']];
} }
$this->load->model('extension/retailcrm/order'); if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/order.php')) {
$this->model_extension_retailcrm_order->sendToCrm($data, $data['order_id']); $this->load->model('extension/retailcrm/custom/order');
$this->model_extension_retailcrm_custom_order->sendToCrm($data, $data['order_id']);
} else {
$this->load->model('extension/retailcrm/order');
$this->model_extension_retailcrm_order->sendToCrm($data, $data['order_id']);
}
} }
} }
@ -85,8 +90,13 @@ class ControllerExtensionModuleRetailcrm extends Controller
$data['order_status'] = $status[$moduleTitle . '_status'][$data['order_status_id']]; $data['order_status'] = $status[$moduleTitle . '_status'][$data['order_status_id']];
} }
$this->load->model('extension/retailcrm/order'); if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/order.php')) {
$this->model_extension_retailcrm_order->changeInCrm($data, $data['order_id']); $this->load->model('extension/retailcrm/custom/order');
$this->model_extension_retailcrm_custom_order->changeInCrm($data, $data['order_id']);
} else {
$this->load->model('extension/retailcrm/order');
$this->model_extension_retailcrm_order->changeInCrm($data, $data['order_id']);
}
} }
} }
@ -119,8 +129,13 @@ class ControllerExtensionModuleRetailcrm extends Controller
); );
} }
$this->load->model('extension/retailcrm/customer'); if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/customer.php')) {
$this->model_extension_retailcrm_customer->sendToCrm($customer); $this->load->model('extension/retailcrm/custom/customer');
$this->model_extension_retailcrm_custom_customer->sendToCrm($customer);
} else {
$this->load->model('extension/retailcrm/customer');
$this->model_extension_retailcrm_customer->sendToCrm($customer);
}
} }
/** /**
@ -139,8 +154,13 @@ class ControllerExtensionModuleRetailcrm extends Controller
$this->load->model('account/address'); $this->load->model('account/address');
$customer['address'] = $this->model_account_address->getAddress($customer['address_id']); $customer['address'] = $this->model_account_address->getAddress($customer['address_id']);
$this->load->model('extension/retailcrm/customer'); if (file_exists(DIR_APPLICATION . 'model/extension/retailcrm/custom/customer.php')) {
$this->model_extension_retailcrm_customer->changeInCrm($customer); $this->load->model('extension/retailcrm/custom/customer');
$this->model_extension_retailcrm_custom_customer->changeInCrm($customer);
} else {
$this->load->model('extension/retailcrm/customer');
$this->model_extension_retailcrm_customer->changeInCrm($customer);
}
} }
private function getModuleTitle() private function getModuleTitle()