3namespace Bitrix\Catalog\Store\EnableWizard;
5use Bitrix\Main\Application;
6use Bitrix\Main\Config\Option;
8use Bitrix\Rest\AppTable;
9use Bitrix\Crm\Integration\Market\Router;
13 private const APP_CODE =
'bitrix.1ctotal';
14 private const INSTALL_TYPE =
'1c_store_management';
15 private const MIN_APP_VERSION = 5;
19 $app = self::getAppInfo();
25 $minVersion = (int)Option::get(
'catalog',
'bitrix_1ctotal_app_min_version', self::MIN_APP_VERSION);
27 return $app[
'INSTALLED'] ===
'Y' && (int)
$app[
'VERSION'] >= $minVersion;
32 if (self::isAppInstalled())
34 $app = self::getAppInfo();
38 'value' => isset(
$app[
'ID']) ? (int)
$app[
'ID'] : 0,
50 if (!Loader::includeModule(
'crm'))
55 return Application::getInstance()->getRouter()->url(
56 Router::getApplicationPath(self::APP_CODE),
59 'install_type' => self::INSTALL_TYPE,
66 $localAppServer = Option::get(
'catalog',
'bitrix_1ctotal_app_local_server');
77 $appId = (int)
$params[
'APP_ID'];
83 if (!Loader::includeModule(
'rest'))
88 $appInfo = AppTable::getById($appId)->fetch();
89 if (!$appInfo || $appInfo[
'CODE'] !== self::APP_CODE)
97 'INSTALLED' => AppTable::INSTALLED,
98 'URL' => $localAppServer .
'/app/1ctotal/v4/index.php',
99 'URL_INSTALL' => $localAppServer .
'/app/1ctotal/v4/install.php',
104 private static function getAppInfo(): ?
array
106 if (!Loader::includeModule(
'rest'))
111 $app = AppTable::getByClientId(self::APP_CODE);
static onRestAppInstall($params)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']