ref #90088 editing handler function

This commit is contained in:
Ivan Chaplygin 2023-06-02 14:43:54 +03:00
parent 3e1c19fd8d
commit b6181ab426
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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));