%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.216.197.92 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/templates/artlot24_copy/components/bitrix/catalog.element/.default/ |
Upload File : |
<? if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die(); use Bitrix\Main\Loader; /** * @var array $templateData * @var array $arParams * @var string $templateFolder * @global CMain $APPLICATION */ global $APPLICATION; if (isset($templateData['TEMPLATE_THEME'])) { $APPLICATION->SetAdditionalCSS($templateFolder.'/themes/'.$templateData['TEMPLATE_THEME'].'/style.css'); $APPLICATION->SetAdditionalCSS('/bitrix/css/main/themes/'.$templateData['TEMPLATE_THEME'].'/style.css', true); } if (!empty($templateData['TEMPLATE_LIBRARY'])) { $loadCurrency = false; if (!empty($templateData['CURRENCIES'])) { $loadCurrency = Loader::includeModule('currency'); } CJSCore::Init($templateData['TEMPLATE_LIBRARY']); if ($loadCurrency) { ?> <script> BX.Currency.setCurrencies(<?=$templateData['CURRENCIES']?>); </script> <? } } if (isset($templateData['JS_OBJ'])) { ?> <script> BX.ready(BX.defer(function(){ if (!!window.<?=$templateData['JS_OBJ']?>) { window.<?=$templateData['JS_OBJ']?>.allowViewedCount(true); } })); </script> <? // check compared state if ($arParams['DISPLAY_COMPARE']) { $compared = false; $comparedIds = array(); $item = $templateData['ITEM']; if (!empty($_SESSION[$arParams['COMPARE_NAME']][$item['IBLOCK_ID']])) { if (!empty($item['JS_OFFERS'])) { foreach ($item['JS_OFFERS'] as $key => $offer) { if (array_key_exists($offer['ID'], $_SESSION[$arParams['COMPARE_NAME']][$item['IBLOCK_ID']]['ITEMS'])) { if ($key == $item['OFFERS_SELECTED']) { $compared = true; } $comparedIds[] = $offer['ID']; } } } elseif (array_key_exists($item['ID'], $_SESSION[$arParams['COMPARE_NAME']][$item['IBLOCK_ID']]['ITEMS'])) { $compared = true; } } if ($templateData['JS_OBJ']) { ?> <script> BX.ready(BX.defer(function(){ if (!!window.<?=$templateData['JS_OBJ']?>) { window.<?=$templateData['JS_OBJ']?>.setCompared('<?=$compared?>'); <? if (!empty($comparedIds)): ?> window.<?=$templateData['JS_OBJ']?>.setCompareInfo(<?=CUtil::PhpToJSObject($comparedIds, false, true)?>); <? endif ?> } })); </script> <? } } // select target offer $request = Bitrix\Main\Application::getInstance()->getContext()->getRequest(); $offerNum = false; $offerId = (int)$this->request->get('OFFER_ID'); $offerCode = $this->request->get('OFFER_CODE'); if ($offerId > 0 && !empty($templateData['OFFER_IDS']) && is_array($templateData['OFFER_IDS'])) { $offerNum = array_search($offerId, $templateData['OFFER_IDS']); } elseif (!empty($offerCode) && !empty($templateData['OFFER_CODES']) && is_array($templateData['OFFER_CODES'])) { $offerNum = array_search($offerCode, $templateData['OFFER_CODES']); } if (!empty($offerNum)) { ?> <script> BX.ready(function(){ if (!!window.<?=$templateData['JS_OBJ']?>) { window.<?=$templateData['JS_OBJ']?>.setOffer(<?=$offerNum?>); } }); </script> <? } }