diff --git a/src/upload/admin/controller/extension/module/retailcrm.php b/src/upload/admin/controller/extension/module/retailcrm.php index 3678dff..9be4d70 100644 --- a/src/upload/admin/controller/extension/module/retailcrm.php +++ b/src/upload/admin/controller/extension/module/retailcrm.php @@ -955,9 +955,9 @@ class ControllerExtensionModuleRetailcrm extends Controller return $types; } - $result = []; + $result['opencart'] = $types['opencart']; - foreach ($types as $type) { + foreach ($types['retailcrm'] as $codeKey => $type) { if ( $type['active'] === true && ( @@ -965,7 +965,7 @@ class ControllerExtensionModuleRetailcrm extends Controller in_array($availableSite, $type['sites'], true) ) ) { - $result[] = $type; + $result['retailcrm'][$codeKey] = $type; } } diff --git a/src/upload/system/library/retailcrm/lib/api/OpencartApiClient.php b/src/upload/system/library/retailcrm/lib/api/OpencartApiClient.php index 72fa92a..adec79a 100644 --- a/src/upload/system/library/retailcrm/lib/api/OpencartApiClient.php +++ b/src/upload/system/library/retailcrm/lib/api/OpencartApiClient.php @@ -87,7 +87,7 @@ class OpencartApiClient { curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_FORBID_REUSE, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); - curl_setopt($curl, CURLOPT_URL, 'https://chaplygin-is.proxy.retailcrm.tech/' . 'index.php?route=api/' . $method . (!empty($getParams) ? '&' . http_build_query($getParams) : '')); + curl_setopt($curl, CURLOPT_URL, $url . 'index.php?route=api/' . $method . (!empty($getParams) ? '&' . http_build_query($getParams) : '')); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($postParams));