diff --git a/Changelog.md b/Changelog.md index f56d422..5433943 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,7 @@ +## v.2.0.4 +* Улучшена механика выгрузки изменений из RetailCRM +* Улучшена механика выборки и настройки способов доставки + ## v.2.0.3 * Улучшена механика выгрузки изменений из RetailCRM * Улучшена механика выборки и настройки способов доставки diff --git a/catalog/controller/api/retailcrm.php b/catalog/controller/api/retailcrm.php index 202670a..ee3fa27 100644 --- a/catalog/controller/api/retailcrm.php +++ b/catalog/controller/api/retailcrm.php @@ -124,17 +124,17 @@ class ControllerApiRetailcrm extends Controller private function auth() { if (version_compare(VERSION, '2.1.0', '>=')) { - if (!isset($this->request->get['token']) - || !$this->request->get['token'] + if (!isset($this->request->get['key']) + || !$this->request->get['key'] ) { return array('error' => 'Not found api key'); } - if (isset($this->request->get['token']) - && !empty($this->request->get['token']) + if (isset($this->request->get['key']) + && !empty($this->request->get['key']) ) { $this->load->model('account/api'); - $api = $this->model_account_api->getApiByKey($this->request->get['token']); + $api = $this->model_account_api->getApiByKey($this->request->get['key']); if (!empty($api)) { return $api; diff --git a/system/library/retailcrm/OpencartApiClient.php b/system/library/retailcrm/OpencartApiClient.php index f1a8a30..63a0557 100644 --- a/system/library/retailcrm/OpencartApiClient.php +++ b/system/library/retailcrm/OpencartApiClient.php @@ -44,7 +44,7 @@ class OpencartApiClient { $opencartStoreInfo = $this->model_setting_store->getStore($this->opencartStoreId); if (version_compare(VERSION, '2.1.0', '>=') && !empty($this->apiToken)) { - $getParams['token'] = $this->apiToken; + $getParams['key'] = $this->apiToken; } elseif (is_array($this->apiToken) && isset($this->apiToken['username'])) { $getParams = $this->apiToken; }