This commit is contained in:
parent
8ce4f5d6c6
commit
4f438b6f0f
@ -1,3 +1,6 @@
|
|||||||
|
## 2023-08-29 v.6.4.3
|
||||||
|
- Добавлена валидация валют при установке и настройке модуля
|
||||||
|
|
||||||
## 2023-08-23 v.6.4.2
|
## 2023-08-23 v.6.4.2
|
||||||
- Исправлена ошибка создания заказов для корпоративных клиентов при использовании функционала брошенных корзин
|
- Исправлена ошибка создания заказов для корпоративных клиентов при использовании функционала брошенных корзин
|
||||||
|
|
||||||
|
@ -21,6 +21,36 @@ class RCrmActions
|
|||||||
public static $CRM_API_VERSION = 'api_version';
|
public static $CRM_API_VERSION = 'api_version';
|
||||||
public const CANCEL_PROPERTY_CODE = 'INTAROCRM_IS_CANCELED';
|
public const CANCEL_PROPERTY_CODE = 'INTAROCRM_IS_CANCELED';
|
||||||
|
|
||||||
|
public static function getCurrencySites(): array
|
||||||
|
{
|
||||||
|
global $DB;
|
||||||
|
|
||||||
|
$sites = self::getSitesList();
|
||||||
|
$sitesLID = [];
|
||||||
|
$sitesCurrency = [];
|
||||||
|
|
||||||
|
foreach ($sites as $site) {
|
||||||
|
$sitesLID[] = $site['LID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$currencies = $DB->Query(
|
||||||
|
"SELECT DISTINCT site.SMN_SITE_ID, hook_data.VALUE
|
||||||
|
FROM `b_landing_site` site
|
||||||
|
LEFT JOIN `b_landing_hook_data` hook_data on site.ID = hook_data.ENTITY_ID
|
||||||
|
WHERE site.SMN_SITE_ID IN ('" . implode("', '", $sitesLID) . "')
|
||||||
|
AND hook_data.CODE = 'CURRENCY_ID';
|
||||||
|
"
|
||||||
|
);
|
||||||
|
|
||||||
|
while ($currencySite = $currencies->Fetch()) {
|
||||||
|
if (!empty($currencySite['SMN_SITE_ID'])) {
|
||||||
|
$sitesCurrency[$currencySite['SMN_SITE_ID']] = $currencySite['VALUE'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sitesCurrency;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -1 +1 @@
|
|||||||
- Исправлена ошибка создания заказов для корпоративных клиентов при использовании функционала брошенных корзин
|
- Добавлена валидация валют при установке и настройке модуля
|
@ -371,7 +371,6 @@ class intaro_retailcrm extends CModule
|
|||||||
$arResult['arSites'] = RCrmActions::getSitesList();
|
$arResult['arSites'] = RCrmActions::getSitesList();
|
||||||
|
|
||||||
if (count($arResult['arSites']) > 1) {
|
if (count($arResult['arSites']) > 1) {
|
||||||
|
|
||||||
$api_host = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_HOST_OPTION, 0);
|
$api_host = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_HOST_OPTION, 0);
|
||||||
$api_key = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_KEY_OPTION, 0);
|
$api_key = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_KEY_OPTION, 0);
|
||||||
|
|
||||||
@ -382,8 +381,38 @@ class intaro_retailcrm extends CModule
|
|||||||
$siteCode[$site['LID']] = null;
|
$siteCode[$site['LID']] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$arResult['arCurrencySites'] = RCrmActions::getCurrencySites();
|
||||||
|
$bitrixBaseCurrency = CCurrency::GetBaseCurrency();
|
||||||
|
$result = $this->getReferenceShops($api_host, $api_key);
|
||||||
|
|
||||||
|
if (isset($result['errCode'])) {
|
||||||
|
$arResult['errCode'] = $result['errCode'];
|
||||||
|
} else {
|
||||||
|
$arResult['sitesList'] = $result['sitesList'];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($arResult['arSites'] as $bitrixSite) {
|
||||||
|
$currentCurrency = $bitrixBaseCurrency;
|
||||||
|
$LID = $bitrixSite['LID'];
|
||||||
|
|
||||||
|
if (isset($arResult['arCurrencySites'][$LID])) {
|
||||||
|
$currentCurrency = $arResult['arCurrencySites'][$LID];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
isset($arResult['sitesList'][$siteCode[$LID]])
|
||||||
|
&& $currentCurrency !== $arResult['sitesList'][$siteCode[$LID]]['currency'])
|
||||||
|
{
|
||||||
|
$arResult['errCode'] = 'ERR_CURRENCY_SITES';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (count($arResult['arSites']) != count($siteCode)) {
|
if (count($arResult['arSites']) != count($siteCode)) {
|
||||||
$arResult['errCode'] = 'ERR_FIELDS_API_HOST';
|
$arResult['errCode'] = 'ERR_FIELDS_API_HOST';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($arResult['errCode'])) {
|
||||||
$APPLICATION->IncludeAdminFile(
|
$APPLICATION->IncludeAdminFile(
|
||||||
GetMessage('MODULE_INSTALL_TITLE'), $this->INSTALL_PATH . '/step11.php'
|
GetMessage('MODULE_INSTALL_TITLE'), $this->INSTALL_PATH . '/step11.php'
|
||||||
);
|
);
|
||||||
@ -1438,6 +1467,9 @@ class intaro_retailcrm extends CModule
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$result = $client->makeRequest('/reference/sites', 'GET');
|
$result = $client->makeRequest('/reference/sites', 'GET');
|
||||||
|
$bitrixSites = RCrmActions::getSitesList();
|
||||||
|
$bitrixBaseCurrency = CCurrency::GetBaseCurrency();
|
||||||
|
$currencySites = RCrmActions::getCurrencySites();
|
||||||
} catch (CurlException $e) {
|
} catch (CurlException $e) {
|
||||||
RCrmActions::eventLog(
|
RCrmActions::eventLog(
|
||||||
'intaro.retailcrm/install/index.php', 'RetailCrm\ApiClient::sitesList',
|
'intaro.retailcrm/install/index.php', 'RetailCrm\ApiClient::sitesList',
|
||||||
@ -1445,9 +1477,33 @@ class intaro_retailcrm extends CModule
|
|||||||
);
|
);
|
||||||
|
|
||||||
$res['errCode'] = 'ERR_' . $e->getCode();
|
$res['errCode'] = 'ERR_' . $e->getCode();
|
||||||
|
|
||||||
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($result) || $result->getStatusCode() == 200) {
|
//Проверка, что был получен корректный ответ
|
||||||
|
if (isset($result) && $result->getStatusCode() == 200) {
|
||||||
|
//Проверка количества магазинов, доступных по апи
|
||||||
|
if (count($bitrixSites) === 1 && count($result->sites) > 1) {
|
||||||
|
$res['errCode'] = 'ERR_COUNT_SITES';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($res['errCode']) && count($bitrixSites) === 1 ) {
|
||||||
|
$currentCurrency = $bitrixBaseCurrency;
|
||||||
|
$LID = $bitrixSites[0]['LID'];
|
||||||
|
|
||||||
|
if (isset($currencySites[$LID])) {
|
||||||
|
$currentCurrency = $currencySites[$LID];
|
||||||
|
}
|
||||||
|
|
||||||
|
$crmSite = reset($result->sites);
|
||||||
|
|
||||||
|
if ($currentCurrency !== $crmSite['currency']) {
|
||||||
|
$res['errCode'] = 'ERR_CURRENCY_SITES';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($res)) {
|
||||||
ConfigProvider::setApiVersion(self::V5);
|
ConfigProvider::setApiVersion(self::V5);
|
||||||
|
|
||||||
$res['sitesList'] = $APPLICATION->ConvertCharsetArray(
|
$res['sitesList'] = $APPLICATION->ConvertCharsetArray(
|
||||||
@ -1455,11 +1511,10 @@ class intaro_retailcrm extends CModule
|
|||||||
'utf-8',
|
'utf-8',
|
||||||
SITE_CHARSET
|
SITE_CHARSET
|
||||||
);
|
);
|
||||||
|
|
||||||
return $res;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
$res['errCode'] = 'ERR_METHOD_NOT_FOUND';
|
$res['errCode'] = 'ERR_METHOD_NOT_FOUND';
|
||||||
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$arModuleVersion = [
|
$arModuleVersion = [
|
||||||
'VERSION' => '6.4.2',
|
'VERSION' => '6.4.3',
|
||||||
'VERSION_DATE' => '2023-08-23 12:30:00'
|
'VERSION_DATE' => '2023-08-29 16:00:00'
|
||||||
];
|
];
|
||||||
|
@ -15,3 +15,7 @@ $MESS ['ERR_METHOD_NOT_FOUND'] = 'Check availability of API methods for current
|
|||||||
$MESS ['INFO_1'] = 'Enter the address of RetailCRM instance (for example, https://demo.retailcrm.ru) and API key.';
|
$MESS ['INFO_1'] = 'Enter the address of RetailCRM instance (for example, https://demo.retailcrm.ru) and API key.';
|
||||||
$MESS ['INFO_2'] = 'API key can be generated when the store is registered in RetailCRM (Administration > Integration).';
|
$MESS ['INFO_2'] = 'API key can be generated when the store is registered in RetailCRM (Administration > Integration).';
|
||||||
$MESS ['INFO_3'] = 'Store code in 1C-Bitrix must correspond with the store code in RetailCRM (Administration > Stores).';
|
$MESS ['INFO_3'] = 'Store code in 1C-Bitrix must correspond with the store code in RetailCRM (Administration > Stores).';
|
||||||
|
$MESS ['ERR_COUNT_SITES'] = 'The API Key you entered relates to more than one store.
|
||||||
|
Change the access settings for the API key, it should work with only one store in CRM';
|
||||||
|
$MESS ['ERR_CURRENCY_SITES'] = 'The currency of the site differs from the currency of the store in CRM.
|
||||||
|
For the integration to work correctly, the currencies in CRM and CMS must match';
|
||||||
|
@ -10,3 +10,5 @@ $MESS ['ERR_0'] = 'Server connection timeout error.';
|
|||||||
$MESS ['ERR_FIELDS_API_HOST'] = 'Fields are filled incorrectly.';
|
$MESS ['ERR_FIELDS_API_HOST'] = 'Fields are filled incorrectly.';
|
||||||
$MESS ['INFO_1'] = 'Set the correspondence between 1C-Bitrix and RetailCRM stores.';
|
$MESS ['INFO_1'] = 'Set the correspondence between 1C-Bitrix and RetailCRM stores.';
|
||||||
$MESS ['INFO_2'] = 'All your stores in RetailCRM must have a common API key!';
|
$MESS ['INFO_2'] = 'All your stores in RetailCRM must have a common API key!';
|
||||||
|
$MESS ['ERR_CURRENCY_SITES'] = 'The currency of the site differs from the currency of the store in CRM.
|
||||||
|
For the integration to work correctly, the currencies in CRM and CMS must match';
|
||||||
|
@ -100,5 +100,13 @@ $MESS ['ONLINE_CONSULTANT_LABEL'] = 'Online Consultant script';
|
|||||||
$MESS ['INTEGRATION_PAYMENT_LIST'] = 'The status will not be transferred for integration payments';
|
$MESS ['INTEGRATION_PAYMENT_LIST'] = 'The status will not be transferred for integration payments';
|
||||||
$MESS ['INTEGRATIONS'] = ' (integration)';
|
$MESS ['INTEGRATIONS'] = ' (integration)';
|
||||||
|
|
||||||
|
$MESS ['ERR_COUNT_SITES'] = 'The API Key you entered relates to more than one store.
|
||||||
|
Change the access settings for the API key, it should work with only one store in CRM';
|
||||||
|
$MESS ['ERR_CURRENCY_SITES'] = 'The currency of the site differs from the currency of the store in CRM.
|
||||||
|
For the integration to work correctly, the currencies in CRM and CMS must match';
|
||||||
|
|
||||||
$MESS ['ACTIVITY_SETTINGS'] = 'Module activity settings';
|
$MESS ['ACTIVITY_SETTINGS'] = 'Module activity settings';
|
||||||
$MESS ['DEACTIVATE_MODULE'] = 'Deactivate the module';
|
$MESS ['DEACTIVATE_MODULE'] = 'Deactivate the module';
|
||||||
|
|
||||||
|
$MESS ['WRONG_CREDENTIALS'] = 'Enter the address and authorization key of the CRM system';
|
||||||
|
$MESS ['Wrong "apiKey" value.'] = 'Invalid authorization key';
|
||||||
|
@ -11,6 +11,10 @@ $MESS ['ERR_403'] = 'Неверный apiKey.';
|
|||||||
$MESS ['ERR_0'] = 'Превышено время ожидания ответа от сервера.';
|
$MESS ['ERR_0'] = 'Превышено время ожидания ответа от сервера.';
|
||||||
$MESS ['ERR_FIELDS_API_HOST'] = 'Неверно заполнены поля.';
|
$MESS ['ERR_FIELDS_API_HOST'] = 'Неверно заполнены поля.';
|
||||||
$MESS ['ERR_METHOD_NOT_FOUND'] = 'Проверьте доступность методов API по текущему ключу.';
|
$MESS ['ERR_METHOD_NOT_FOUND'] = 'Проверьте доступность методов API по текущему ключу.';
|
||||||
|
$MESS ['ERR_COUNT_SITES'] = 'Введенный вами API Ключ относится более чем к одному магазину.
|
||||||
|
Измените настройки доступа для API ключа, он должен работать только с одним магазином в CRM';
|
||||||
|
$MESS ['ERR_CURRENCY_SITES'] = 'Валюта сайта отличается от валюты магазина в CRM.
|
||||||
|
Для корректной работы интеграции, валюты в CRM и CMS должны совпадать';
|
||||||
//$MESS ['URL_NOT_FOUND'] = 'В настройках одного или нескольких сайтов не заполнено поле "URL сервера".';
|
//$MESS ['URL_NOT_FOUND'] = 'В настройках одного или нескольких сайтов не заполнено поле "URL сервера".';
|
||||||
$MESS ['INFO_1'] = 'Введите адрес экземпляра RetailCRM (например, https://demo.retailcrm.ru) и API-ключ.';
|
$MESS ['INFO_1'] = 'Введите адрес экземпляра RetailCRM (например, https://demo.retailcrm.ru) и API-ключ.';
|
||||||
$MESS ['INFO_2'] = 'API-ключ можно сгенерировать при регистрации магазина в RetailCRM (Администрирование > Интеграция).';
|
$MESS ['INFO_2'] = 'API-ключ можно сгенерировать при регистрации магазина в RetailCRM (Администрирование > Интеграция).';
|
||||||
|
@ -10,3 +10,5 @@ $MESS ['ERR_0'] = 'Превышено время ожидания ответа
|
|||||||
$MESS ['ERR_FIELDS_API_HOST'] = 'Неверно заполнены поля.';
|
$MESS ['ERR_FIELDS_API_HOST'] = 'Неверно заполнены поля.';
|
||||||
$MESS ['INFO_1'] = 'Задайте соответствия между Вашими магазинами в 1С-Битрикс и RetailCRM.';
|
$MESS ['INFO_1'] = 'Задайте соответствия между Вашими магазинами в 1С-Битрикс и RetailCRM.';
|
||||||
$MESS ['INFO_2'] = 'У всех Ваших магазинов в RetailCRM должен быть общий API-ключ!';
|
$MESS ['INFO_2'] = 'У всех Ваших магазинов в RetailCRM должен быть общий API-ключ!';
|
||||||
|
$MESS ['ERR_CURRENCY_SITES'] = 'Валюта сайта отличается от валюты магазина в CRM.
|
||||||
|
Для корректной работы интеграции, валюты в CRM и CMS должны совпадать';
|
@ -27,6 +27,11 @@ $MESS ['ORDER_UPLOAD_INFO'] = 'Для загрузки всех заказов
|
|||||||
$MESS ['INTEGRATION_PAYMENT_LIST'] = 'Для интеграционных оплат статус не передаётся';
|
$MESS ['INTEGRATION_PAYMENT_LIST'] = 'Для интеграционных оплат статус не передаётся';
|
||||||
$MESS ['INTEGRATIONS'] = ' (интеграционная)';
|
$MESS ['INTEGRATIONS'] = ' (интеграционная)';
|
||||||
|
|
||||||
|
$MESS ['ERR_COUNT_SITES'] = 'Введенный вами API Ключ относится более чем к одному магазину.
|
||||||
|
Измените настройки доступа для API ключа, он должен работать только с одним магазином в CRM';
|
||||||
|
$MESS ['ERR_CURRENCY_SITES'] = 'Валюта сайта отличается от валюты магазина в CRM.
|
||||||
|
Для корректной работы интеграции, валюты в CRM и CMS должны совпадать';
|
||||||
|
|
||||||
$MESS ['ICRM_OPTIONS_SUBMIT_TITLE'] = 'Сохранить настройки';
|
$MESS ['ICRM_OPTIONS_SUBMIT_TITLE'] = 'Сохранить настройки';
|
||||||
$MESS ['ICRM_OPTIONS_SUBMIT_VALUE'] = 'Сохранить';
|
$MESS ['ICRM_OPTIONS_SUBMIT_VALUE'] = 'Сохранить';
|
||||||
|
|
||||||
@ -161,3 +166,6 @@ $MESS ['TEMPLATE_COPING_ERROR'] = 'Ошибка копирования шабл
|
|||||||
|
|
||||||
$MESS ['ACTIVITY_SETTINGS'] = 'Настройки активности модуля';
|
$MESS ['ACTIVITY_SETTINGS'] = 'Настройки активности модуля';
|
||||||
$MESS ['DEACTIVATE_MODULE'] = 'Деактивировать модуль';
|
$MESS ['DEACTIVATE_MODULE'] = 'Деактивировать модуль';
|
||||||
|
|
||||||
|
$MESS ['WRONG_CREDENTIALS'] = 'Введите адрес и ключ авторизации CRM системы';
|
||||||
|
$MESS ['Wrong "apiKey" value.'] = 'Недействительный ключ авторизации';
|
||||||
|
@ -118,6 +118,7 @@ if (file_exists($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/intaro.retailcrm/cl
|
|||||||
}
|
}
|
||||||
|
|
||||||
$arResult['arSites'] = RCrmActions::getSitesList();
|
$arResult['arSites'] = RCrmActions::getSitesList();
|
||||||
|
$arResult['arCurrencySites'] = RCrmActions::getCurrencySites();
|
||||||
//ajax update deliveryServices
|
//ajax update deliveryServices
|
||||||
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') && isset($_POST['ajax']) && ($_POST['ajax'] === 1)) {
|
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') && isset($_POST['ajax']) && ($_POST['ajax'] === 1)) {
|
||||||
$api_host = COption::GetOptionString($mid, $CRM_API_HOST_OPTION, 0);
|
$api_host = COption::GetOptionString($mid, $CRM_API_HOST_OPTION, 0);
|
||||||
@ -275,6 +276,10 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
|
|
||||||
COption::SetOptionString($mid, 'api_host', $api_host);
|
COption::SetOptionString($mid, 'api_host', $api_host);
|
||||||
COption::SetOptionString($mid, 'api_key', $api_key);
|
COption::SetOptionString($mid, 'api_key', $api_key);
|
||||||
|
} else {
|
||||||
|
$uri .= '&errc=ERR_WRONG_CREDENTIALS';
|
||||||
|
|
||||||
|
LocalRedirect($uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
//form order types ids arr
|
//form order types ids arr
|
||||||
@ -1061,6 +1066,49 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
$currencyOption = COption::GetOptionString($mid, $CRM_CURRENCY, 0) ?: $baseCurrency;
|
$currencyOption = COption::GetOptionString($mid, $CRM_CURRENCY, 0) ?: $baseCurrency;
|
||||||
$currencyList = \Bitrix\Currency\CurrencyManager::getCurrencyList();
|
$currencyList = \Bitrix\Currency\CurrencyManager::getCurrencyList();
|
||||||
|
|
||||||
|
$errorsText = [];
|
||||||
|
|
||||||
|
if (preg_match('/&errc=ERR_(.*)/is', $APPLICATION->GetCurUri(), $matches)) {
|
||||||
|
$errorsText[] = GetMessage(urldecode($matches[1]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($errorsText)) {
|
||||||
|
if (count($arResult['arSites']) === 1 && count($arResult['sitesList']) > 1) {
|
||||||
|
$errorsText[] = GetMessage('ERR_COUNT_SITES');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($arResult['arSites']) > 1) {
|
||||||
|
foreach ($optionsSitesList as $LID => $crmCode) {
|
||||||
|
if (empty($crmCode)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$currentCurrency = $baseCurrency;
|
||||||
|
|
||||||
|
if (isset($arResult['arCurrencySites'][$LID])) {
|
||||||
|
$currentCurrency = $arResult['arCurrencySites'][$LID];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($currentCurrency !== $arResult['sitesList'][$crmCode]['currency']) {
|
||||||
|
$errorsText[] = GetMessage('ERR_CURRENCY_SITES') . ' (' . $arResult['sitesList'][$crmCode]['name'] . ')';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$currentCurrency = $baseCurrency;
|
||||||
|
$LID = $arResult['arSites'][0]['LID'];
|
||||||
|
|
||||||
|
if (isset($arResult['arCurrencySites'][$LID])) {
|
||||||
|
$currentCurrency = $arResult['arCurrencySites'][$LID];
|
||||||
|
}
|
||||||
|
|
||||||
|
$crmSite = reset($arResult['sitesList']);
|
||||||
|
|
||||||
|
if ($currentCurrency !== $crmSite['currency']) {
|
||||||
|
$errorsText[] = GetMessage('ERR_CURRENCY_SITES') . ' (' . $crmSite['name'] . ')';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$customFields = [['code' => '__default_empty_value__', 'name' => GetMessage('SELECT_VALUE')]];
|
$customFields = [['code' => '__default_empty_value__', 'name' => GetMessage('SELECT_VALUE')]];
|
||||||
$crmCouponFieldOption = COption::GetOptionString($mid, $CRM_COUPON_FIELD, 0) ?: null;
|
$crmCouponFieldOption = COption::GetOptionString($mid, $CRM_COUPON_FIELD, 0) ?: null;
|
||||||
$page = 1;
|
$page = 1;
|
||||||
@ -1462,7 +1510,8 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
<tr class="heading">
|
<tr class="heading">
|
||||||
<td colspan="2"><b><?php echo GetMessage('ICRM_CONN_SETTINGS'); ?></b></td>
|
<td colspan="2"><b><?php echo GetMessage('ICRM_CONN_SETTINGS'); ?></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
|
<tr >
|
||||||
<td width="50%" class="adm-detail-content-cell-l"><?php echo GetMessage('ICRM_API_HOST'); ?></td>
|
<td width="50%" class="adm-detail-content-cell-l"><?php echo GetMessage('ICRM_API_HOST'); ?></td>
|
||||||
<td width="50%" class="adm-detail-content-cell-r"><input type="text" id="api_host" name="api_host" value="<?php echo $api_host; ?>"></td>
|
<td width="50%" class="adm-detail-content-cell-r"><input type="text" id="api_host" name="api_host" value="<?php echo $api_host; ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -1470,6 +1519,19 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
<td width="50%" class="adm-detail-content-cell-l"><?php echo GetMessage('ICRM_API_KEY'); ?></td>
|
<td width="50%" class="adm-detail-content-cell-l"><?php echo GetMessage('ICRM_API_KEY'); ?></td>
|
||||||
<td width="50%" class="adm-detail-content-cell-r"><input type="text" id="api_key" name="api_key" value="<?php echo $api_key; ?>"></td>
|
<td width="50%" class="adm-detail-content-cell-r"><input type="text" id="api_key" name="api_key" value="<?php echo $api_key; ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<?php if ($errorsText): ?>
|
||||||
|
<?php foreach ($errorsText as $error): ?>
|
||||||
|
<tr align="center">
|
||||||
|
<td colspan="2">
|
||||||
|
<strong style="color:red" >
|
||||||
|
<?php echo $error; ?>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (count($arResult['arSites']) > 1): ?>
|
<?php if (count($arResult['arSites']) > 1): ?>
|
||||||
<tr class="heading">
|
<tr class="heading">
|
||||||
<td colspan="2" style="background-color: transparent;">
|
<td colspan="2" style="background-color: transparent;">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user