Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/catalog/product-selector/ |
Upload File : |
<?php use Bitrix\Catalog\StoreDocumentTable; use Bitrix\Main\Loader; use Bitrix\Main\Localization\Loc; use Bitrix\Catalog\Config\State; use Bitrix\Catalog\Store\EnableWizard\TariffChecker; if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) { die(); } $limitInfo = null; if (\Bitrix\Main\Loader::includeModule('catalog')) { $limitInfo = \Bitrix\Catalog\Config\State::getCrmExceedingProductLimit(); } $isInstallMobileApp = (bool)\CUserOptions::GetOption('mobile', 'iOsLastActivityDate') || (bool)\CUserOptions::GetOption('mobile', 'AndroidLastActivityDate') ; $isEnabledQrAuth = $isInstallMobileApp || (bool)\CUserOptions::GetOption('product-selector', 'barcodeQrAuth'); $isShowedBarcodeSpotlightInfo = \CUserOptions::GetOption('spotlight', 'view_date_selector_barcode_scanner_info'); $isAllowedShowBarcodeSpotlightInfo = false; if ( !$isShowedBarcodeSpotlightInfo && \Bitrix\Main\Loader::includeModule('catalog') && \Bitrix\Main\Loader::includeModule('iblock') ) { $catalogId = CCrmCatalog::GetDefaultID(); $product = \CIBlockElement::GetList( false, ['IBLOCK_ID' => $catalogId], false, ['nTopCount' => 1], ['ID'] )->Fetch(); $hasProducts = !empty($product); $arrivalDocuments = StoreDocumentTable::getRow([ 'select' => ['ID'], 'filter' => ['=DOC_TYPE' => StoreDocumentTable::TYPE_ARRIVAL], ]); $hasArrivalDocuments = !empty($arrivalDocuments); $isAllowedShowBarcodeSpotlightInfo = $hasProducts && $hasArrivalDocuments; } return [ 'css' => 'dist/product-selector.bundle.css', 'js' => 'dist/product-selector.bundle.js', 'rel' => [ 'ui.design-tokens', 'ui.forms', 'fileinput', 'catalog.sku-tree', 'main.loader', 'ui.info-helper', 'catalog.barcode-scanner', 'ui.qrauthorization', 'ui.tour', 'spotlight', 'main.core.events', 'ui.entity-selector', 'ui.icon-set.main', 'catalog.tool-availability-manager', 'ui.notification', 'main.core', 'catalog.product-selector', 'catalog.product-model', 'catalog.external-catalog-placement', ], 'skip_core' => false, 'settings' => [ 'isExternalCatalog' => State::isExternalCatalog(), 'is1cPlanRestricted' => TariffChecker::isOnecInventoryManagementRestricted(), 'limitInfo' => $limitInfo, 'isInstallMobileApp' => $isInstallMobileApp, 'isEnabledQrAuth' => $isEnabledQrAuth, 'isShowedBarcodeSpotlightInfo' => $isShowedBarcodeSpotlightInfo, 'isAllowedShowBarcodeSpotlightInfo' => $isAllowedShowBarcodeSpotlightInfo, 'errorAdminHint' => Loader::includeModule('bitrix24') ? Loc::getMessage('CATALOG_SELECTOR_SEARCH_POPUP_DISABLED_ADMIN_B4_HINT') : Loc::getMessage('CATALOG_SELECTOR_SEARCH_POPUP_DISABLED_ADMIN_HINT') , ], ];