%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.145.74.249 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/components/bitrix/catalog.productcard.details/templates/.default/ |
Upload File : |
<?php /** * @var $component \CatalogProductDetailsComponent * @var $this \CBitrixComponentTemplate */ if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) { die(); } use Bitrix\Main\Application; use Bitrix\Main\IO\File; use Bitrix\Main\Loader; use Bitrix\Main\Localization\Loc; use Bitrix\Main\UI\Extension; use Bitrix\Main\Web\Json; use Bitrix\UI\Buttons\Button; use Bitrix\UI\Buttons\Color; use Bitrix\UI\Buttons\JsHandler; use Bitrix\UI\Buttons\SettingsButton; use Bitrix\UI\Toolbar\Facade\Toolbar; $bodyClass = $APPLICATION->GetPageProperty("BodyClass"); $APPLICATION->SetPageProperty('BodyClass', ($bodyClass ? $bodyClass.' ' : '').'no-background'); Loader::includeModule('ui'); $settingsButton = new SettingsButton([ 'className' => $arResult['IS_NEW_PRODUCT'] ? 'ui-btn-highlighted' : '', ]); Toolbar::addButton($settingsButton); $feedbackButton = new Button([ 'color' => Color::LIGHT_BORDER, 'text' => Loc::getMessage('CPD_FEEDBACK_BUTTON'), 'className' => $arResult['IS_NEW_PRODUCT'] ? 'ui-btn-highlighted' : '', 'onclick' => new JsHandler( 'BX.Catalog.ProductCard.Instance.openFeedbackPanel', 'BX.Catalog.ProductCard.Instance' ), ]); Toolbar::addButton($feedbackButton); Toolbar::deleteFavoriteStar(); Extension::load([ 'catalog.entity-card', 'admin_interface', 'sidepanel', 'ui.hint', ]); $tabs = [ [ 'id' => 'main', 'name' => Loc::getMessage('CPD_TAB_GENERAL_TITLE'), 'enabled' => true, 'active' => true, ], // [ // 'id' => 'seo', // 'name' => 'SEO', // 'enabled' => false, // 'active' => false, // ], ]; $guid = 'product-details'; $containerId = "{$guid}_container"; $tabMenuContainerId = "{$guid}_tabs_menu"; $tabContainerId = "{$guid}_tabs"; ?> <script> BX.message(<?=Json::encode(Loc::loadLanguageFile(__FILE__))?>); BX(function() { var topWindow = BX.PageObject.getRootWindow().window; if (!topWindow.adminSidePanel || !BX.is_subclass_of(topWindow.adminSidePanel, BX.adminSidePanel)) { topWindow.adminSidePanel = new BX.adminSidePanel({ publicMode: true }); } BX.Catalog.ProductCard.Instance = new BX.Catalog.ProductCard( '<?=CUtil::JSEscape($guid)?>', { entityId: '<?=CUtil::JSEscape($arResult['PRODUCT_FIELDS']['ID'])?>', componentName: '<?=CUtil::JSEscape($component->getName())?>', componentSignedParams: '<?=CUtil::JSEscape($component->getSignedParameters())?>', isSimpleProduct: !!'<?=CUtil::JSEscape($arResult['SIMPLE_PRODUCT'])?>', tabs: <?=CUtil::PhpToJSObject($tabs)?>, settingsButtonId: '<?=$settingsButton->getUniqId()?>', cardSettings: <?=CUtil::PhpToJSObject($arResult['CARD_SETTINGS'])?>, feedbackUrl: '<?=CUtil::JSEscape($arParams['PATH_TO']['FEEDBACK'] ?? '')?>', containerId: '<?=CUtil::JSEscape($containerId)?>', tabContainerId: '<?=CUtil::JSEscape($tabContainerId)?>', tabMenuContainerId: '<?=CUtil::JSEscape($tabMenuContainerId)?>', serviceUrl: '<?=CUtil::JSEscape($arResult['SERVICE_URL'])?>', creationPropertyUrl: '<?=CUtil::JSEscape($arResult['UI_CREATION_PROPERTY_URL'])?>', creationVariationPropertyUrl: '<?=CUtil::JSEscape($arResult['UI_CREATION_SKU_PROPERTY_URL'])?>', variationGridId: '<?=CUtil::JSEscape($arResult['VARIATION_GRID_ID'])?>' } ); }); </script> <div id="<?=htmlspecialcharsbx($containerId)?>" class="catalog-entity-wrap catalog-wrapper"> <?php $tabContainerClassName = 'catalog-entity-section catalog-entity-section-tabs'; $tabContainerClassName .= ' ui-entity-stream-section-planned-above-overlay'; ?> <div class="<?=$tabContainerClassName?>"> <ul id="<?=htmlspecialcharsbx($tabMenuContainerId)?>" class="catalog-entity-section-tabs-container"> <?php foreach ($tabs as $tab) { $classNames = ['catalog-entity-section-tab']; if (isset($tab['active']) && $tab['active']) { $classNames[] = 'catalog-entity-section-tab-current'; } elseif (isset($tab['enabled']) && !$tab['enabled']) { $classNames[] = 'catalog-entity-section-tab-disabled'; } ?> <li data-tab-id="<?=htmlspecialcharsbx($tab['id'])?>" class="<?=implode(' ', $classNames)?>"> <a class="catalog-entity-section-tab-link" href="#"><?=htmlspecialcharsbx($tab['name'])?></a> </li> <?php } ?> </ul> </div> <div id="<?=htmlspecialcharsbx($tabContainerId)?>" style="position: relative;"> <?php foreach ($tabs as $tab) { $tabId = $tab['id']; $className = 'catalog-entity-section catalog-entity-section-info'; $style = ''; if ($arResult['IS_NEW_PRODUCT']) { $className .= ' catalog-entity-section-new'; } if ($tab['active'] !== true) { $className .= ' catalog-entity-section-tab-content-hide catalog-entity-section-above-overlay'; $style = 'style="display: none;"'; } ?> <div data-tab-id="<?=htmlspecialcharsbx($tabId)?>" class="<?=$className?>" <?=$style?>> <?php $tabFolderPath = Application::getDocumentRoot().$templateFolder.'/tabs/'; $file = new File($tabFolderPath.$tabId.'.php'); if ($file->isExists()) { include $file->getPath(); } else { echo "Unknown tab {{$tabId}}."; } ?> </div> <?php } ?> </div> </div>