/var/www/leselshop.ru/local/templates/main/components/bitrix/catalog.section/catalogdesign/template.php
foreach ($arItem['OFFERS'] as $offerKey => $offerArr)
{
if ($offerArr['CATALOG_AVAILABLE'] == 'N')
continue;
if ($offerArr['DISPLAY_PROPERTIES'] && !empty($offerArr['MIN_PRICE']) )
{
$offersSizes[] = array(
'OFFER_ID' => $offerArr['ID'],
'NAME' => $offerArr['DISPLAY_PROPERTIES']['RAZMER']['DISPLAY_VALUE'],
'PRICE' => number_format($offerArr['MIN_PRICE']['VALUE'], 0, ',', ' ').' р'
);
}
}
usort($offersSizes, function($a, $b) {
return $a['NAME'] - $b['NAME'];
});
if(!empty($offersSizes)) {
?>
<div style="display: none;">
<div class="js-buy-required-block catalog-size-block">
<div class="size-place js-sizes">
<div class="prop-name">Выберите размер</div>
<div class="notice please red-color hided">
Для того, чтобы добавить товар в корзину, выберите подходящий размер
</div>
<div class="unit">
<? foreach ($offersSizes as $offerSize):?>
<?
switch ($offerSize['NAME']) {
case '00':
$rusize = 'Российский размер: 44-46';
break;
case '01':
Arguments
"usort(): Argument #1 ($array) must be of type array, null given"
/var/www/leselshop.ru/local/templates/main/components/bitrix/catalog.section/catalogdesign/template.php
foreach ($arItem['OFFERS'] as $offerKey => $offerArr)
{
if ($offerArr['CATALOG_AVAILABLE'] == 'N')
continue;
if ($offerArr['DISPLAY_PROPERTIES'] && !empty($offerArr['MIN_PRICE']) )
{
$offersSizes[] = array(
'OFFER_ID' => $offerArr['ID'],
'NAME' => $offerArr['DISPLAY_PROPERTIES']['RAZMER']['DISPLAY_VALUE'],
'PRICE' => number_format($offerArr['MIN_PRICE']['VALUE'], 0, ',', ' ').' р'
);
}
}
usort($offersSizes, function($a, $b) {
return $a['NAME'] - $b['NAME'];
});
if(!empty($offersSizes)) {
?>
<div style="display: none;">
<div class="js-buy-required-block catalog-size-block">
<div class="size-place js-sizes">
<div class="prop-name">Выберите размер</div>
<div class="notice please red-color hided">
Для того, чтобы добавить товар в корзину, выберите подходящий размер
</div>
<div class="unit">
<? foreach ($offersSizes as $offerSize):?>
<?
switch ($offerSize['NAME']) {
case '00':
$rusize = 'Российский размер: 44-46';
break;
case '01':
/var/www/leselshop.ru/bitrix/modules/main/classes/general/component_template.php
/** @noinspection PhpUnusedLocalVariableInspection */
$templateName = $this->__name;
/** @noinspection PhpUnusedLocalVariableInspection */
$templateFile = $this->__file;
/** @noinspection PhpUnusedLocalVariableInspection */
$templateFolder = $this->__folder;
/** @noinspection PhpUnusedLocalVariableInspection */
$componentPath = $this->__component->GetPath();
$component = &$this->__component;
if ($this->__fileAlt <> '')
{
include($_SERVER["DOCUMENT_ROOT"].$this->__fileAlt);
return null;
}
$templateData = false;
include($_SERVER["DOCUMENT_ROOT"].$this->__file);
for ($i = count($this->frames) - 1; $i >= 0; $i--)
{
$frame = $this->frames[$i];
if ($frame->isStarted() && !$frame->isEnded())
{
$frame->end();
}
}
if (!$this->getFrameMode())
{
$page = \Bitrix\Main\Composite\Page::getInstance();
$page->giveNegativeComponentVote($this->__file);
}
$component_epilog = $this->__folder."/component_epilog.php";
if(file_exists($_SERVER["DOCUMENT_ROOT"].$component_epilog))
{
//These will be available with extract then component will
Arguments
"/var/www/leselshop.ru/local/templates/main/components/bitrix/catalog.section/catalogdesign/template.php"
/var/www/leselshop.ru/bitrix/modules/main/classes/general/component_template.php
if ($parentTemplate)
$parentTemplateFolder = $parentTemplate->GetFolder();
}
if ($externalEngine)
{
$result = call_user_func(
$arBXAvailableTemplateEngines[$this->__engineID]["function"],
$this->__file,
$arResult,
$arParams,
$arLangMessages,
$this->__folder,
$parentTemplateFolder,
$this
);
}
else
{
$result = $this->__IncludePHPTemplate($arResult, $arParams, $parentTemplateFolder);
}
return $result;
}
/**
* Includes template language file.
*
* @param string $relativePath
* @param false|string $lang
* @param boolean $return
*
* @return array
*/
public function IncludeLangFile($relativePath = "", $lang = false, $return = false)
{
$arLangMessages = array();
if($this->__folder <> '')
{
/var/www/leselshop.ru/bitrix/modules/main/classes/general/component.php
$this->__template->setLanguageId($this->getLanguageId());
if ($this->__template->Init($this, $siteTemplate, $customTemplatePath))
return true;
else
return false;
}
/**
* Function executes initialized template of the component.
*
* <p>Note: component must be inited by initComponent method.</p>
* @return void
*
*/
final public function showComponentTemplate()
{
if (!$this->__bInited)
return null;
if ($this->__template)
$this->__template->includeTemplate($this->arResult);
if(is_array($this->arResultCacheKeys))
{
$arNewResult = array();
foreach($this->arResultCacheKeys as $key)
if(array_key_exists($key, $this->arResult))
$arNewResult[$key] = $this->arResult[$key];
$this->arResult = $arNewResult;
}
if(!empty($this->__editButtons))
{
foreach($this->__editButtons as $button)
{
if($button[0] == 'AddEditAction')
$this->addEditAction($button[1], $button[2], $button[3], $button[4]);
else
$this->addDeleteAction($button[1], $button[2], $button[3], $button[4]);
}
}
/var/www/leselshop.ru/bitrix/modules/main/classes/general/component.php
return $result;
}
/**
* Function executes the template.
*
* <p>Note: component must be inited by initComponent method.</p>
* @param string $templatePage
* @param string $customTemplatePath
* @return void
*
*/
final public function includeComponentTemplate($templatePage = "", $customTemplatePath = "")
{
if (!$this->__bInited)
return null;
if ($this->initComponentTemplate($templatePage, $this->getSiteTemplateId(), $customTemplatePath))
{
$this->showComponentTemplate();
if($this->__component_epilog)
$this->includeComponentEpilog($this->__component_epilog);
}
else
{
$this->abortResultCache();
$this->__showError(str_replace(
array("#PAGE#", "#NAME#"),
array($templatePage, $this->getTemplateName()),
"Cannot find '#NAME#' template with page '#PAGE#'"
));
}
$this->__template->__component = null;
}
/**
* Function initializes the template of the component. Returns true on success.
*
* <p>Instansiates the template object and calls it's init function.</p>
* <p>Note: component must be inited by initComponent method.</p>
* @param string $templatePage
/var/www/leselshop.ru/bitrix/modules/iblock/lib/component/base.php
/**
* Show cached component data or load if outdated.
* If extended mode enabled - uses result_modifier.php logic in component (be careful not to duplicate it).
*/
protected function loadData()
{
if ($this->isCacheDisabled() || $this->startResultCache(false, $this->getAdditionalCacheId(), $this->getComponentCachePath()))
{
$this->processResultData();
if (!$this->hasErrors())
{
if ($this->isExtendedMode())
{
$this->initComponentTemplate();
$this->applyTemplateModifications();
}
$this->initResultCache();
$this->includeComponentTemplate();
$this->clearCatalogDiscountCache();
}
}
}
/**
* Return component cache identifier.
*
* @return mixed
*/
abstract protected function getAdditionalCacheId();
/**
* Return component cache path.
*
* @return mixed
*/
abstract protected function getComponentCachePath();
public function getTemplateEmptyPreview()
/var/www/leselshop.ru/bitrix/modules/iblock/lib/component/elementlist.php
return '/'.$this->getSiteId().$this->getRelativePath();
}
protected function makeOutputResult()
{
parent::makeOutputResult();
$this->arResult['PRICES'] = $this->storage['PRICES'];
$this->arResult['ITEMS'] = $this->elements;
$this->arResult['ELEMENTS'] = array_keys($this->elementLinks);
}
/**
* Load component data with use page navigation.
*
* @return void
*/
public function loadData()
{
$this->initNavParams();
parent::loadData();
}
protected function deferredLoadAction()
{
$this->prepareDeferredParams();
parent::deferredLoadAction();
}
protected function prepareDeferredParams()
{
$this->arParams['~PRODUCT_ROW_VARIANTS'] = $this->arParams['~DEFERRED_PRODUCT_ROW_VARIANTS'];
$this->arParams['PRODUCT_ROW_VARIANTS'] = static::parseJsonParameter($this->arParams['~PRODUCT_ROW_VARIANTS']);
if (isset($this->arParams['PREDICT_ELEMENT_COUNT']) && $this->arParams['PREDICT_ELEMENT_COUNT'] === 'Y')
{
$this->arParams['PAGE_ELEMENT_COUNT'] = static::predictElementCountByVariants($this->arParams['PRODUCT_ROW_VARIANTS']);
}
else
{
$this->arParams['PAGE_ELEMENT_COUNT'] = $this->arParams['DEFERRED_PAGE_ELEMENT_COUNT'];
/var/www/leselshop.ru/bitrix/modules/iblock/lib/component/base.php
* Mark last usage of BigData.
*/
protected function initBigDataLastUsage()
{
$lastUsage = Main\Config\Option::get('main', 'rcm_component_usage', 0);
if ($lastUsage == 0 || (time() - $lastUsage) > 3600)
{
Main\Config\Option::set('main', 'rcm_component_usage', time());
}
}
/**
* This method executes when "initialLoad" action is chosen.
*/
protected function initialLoadAction()
{
$this->productIds = $this->getProductIds();
$this->productIdMap = $this->getProductIdMap($this->productIds);
$this->loadData();
}
/**
* Show cached component data or load if outdated.
* If extended mode enabled - uses result_modifier.php logic in component (be careful not to duplicate it).
*/
protected function loadData()
{
if ($this->isCacheDisabled() || $this->startResultCache(false, $this->getAdditionalCacheId(), $this->getComponentCachePath()))
{
$this->processResultData();
if (!$this->hasErrors())
{
if ($this->isExtendedMode())
{
$this->initComponentTemplate();
$this->applyTemplateModifications();
}
$this->initResultCache();
/var/www/leselshop.ru/bitrix/components/bitrix/catalog.section/class.php
}
else
{
unset($filterFields['INCLUDE_SUBSECTIONS']);
unset($filterFields['SECTION_GLOBAL_ACTIVE']);
}
}
return $filterFields;
}
protected function makeOutputResult()
{
parent::makeOutputResult();
$this->arResult['USE_CATALOG_BUTTONS'] = $this->storage['USE_CATALOG_BUTTONS'];
}
protected function initialLoadAction()
{
parent::initialLoadAction();
if (!$this->hasErrors())
{
$this->initAdminIconsPanel();
$this->setTemplateCachedData($this->arResult['NAV_CACHED_DATA'] ?? '');
$this->initMetaData();
}
}
protected function initAdminIconsPanel()
{
global $APPLICATION, $INTRANET_TOOLBAR, $USER;
$this->storage['TITLE_OPTIONS'] = null;
if (!$USER->IsAuthorized())
{
return;
}
/var/www/leselshop.ru/bitrix/modules/iblock/lib/component/base.php
$action = $this->request->get('bigData') === 'Y' ? 'bigDataLoad' : 'deferredLoad';
}
else
{
$action = 'initialLoad';
}
return $action;
}
/**
* Action executor.
*/
protected function doAction()
{
$action = $this->getAction();
if (is_callable(array($this, $action.'Action')))
{
call_user_func(array($this, $action.'Action'));
}
}
/**
* @return int|false
*/
public function executeComponent()
{
$this->checkModules();
if ($this->hasErrors())
{
return $this->processErrors();
}
$action = $this->prepareAction();
$this->setAction($action);
$this->doAction();
if ($this->hasErrors())
/var/www/leselshop.ru/bitrix/modules/iblock/lib/component/base.php
$action = $this->request->get('bigData') === 'Y' ? 'bigDataLoad' : 'deferredLoad';
}
else
{
$action = 'initialLoad';
}
return $action;
}
/**
* Action executor.
*/
protected function doAction()
{
$action = $this->getAction();
if (is_callable(array($this, $action.'Action')))
{
call_user_func(array($this, $action.'Action'));
}
}
/**
* @return int|false
*/
public function executeComponent()
{
$this->checkModules();
if ($this->hasErrors())
{
return $this->processErrors();
}
$action = $this->prepareAction();
$this->setAction($action);
$this->doAction();
if ($this->hasErrors())
/var/www/leselshop.ru/bitrix/modules/iblock/lib/component/base.php
{
call_user_func(array($this, $action.'Action'));
}
}
/**
* @return int|false
*/
public function executeComponent()
{
$this->checkModules();
if ($this->hasErrors())
{
return $this->processErrors();
}
$action = $this->prepareAction();
$this->setAction($action);
$this->doAction();
if ($this->hasErrors())
{
return $this->processErrors();
}
return $this->arResult['ID'] ?? false;
}
/**
* Returns prepared all component parameters after verify template parameters .
*
* @return array
*/
public function applyTemplateModifications()
{
$this->prepareTemplateParams();
$this->checkTemplateTheme();
$this->editTemplateData();
/var/www/leselshop.ru/bitrix/modules/main/classes/general/component.php
$keysToExport = $component->listKeysSignedParameters();
if($keysToExport)
{
$component->storeSignedParameters(array_intersect_key($arParams, array_combine($keysToExport, $keysToExport)));
}
$component->arParams = $component->onPrepareComponentParams($arParams);
$component->__prepareComponentParams($component->arParams);
$componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($component);
$componentFrame->start();
if($returnResult)
{
$component->executeComponent();
$result = $component->arResult;
}
else
{
$result = $component->executeComponent();
}
$this->__arIncludeAreaIcons = $component->__arIncludeAreaIcons;
$frameMode = $component->getFrameMode();
$componentFrame->end();
}
else
{
$this->includeComponentLang();
$this->__prepareComponentParams($arParams);
$this->arParams = $arParams;
$componentFrame = new \Bitrix\Main\Composite\Internals\AutomaticArea($this);
$componentFrame->start();
if($returnResult)
{
$this->__IncludeComponent();
$result = $this->arResult;
/var/www/leselshop.ru/bitrix/modules/main/classes/general/main.php
{
echo $this->IncludeStringBefore();
}
$result = null;
$bComponentEnabled = (!isset($arFunctionParams["ACTIVE_COMPONENT"]) || $arFunctionParams["ACTIVE_COMPONENT"] <> "N");
$component = new CBitrixComponent();
if ($component->InitComponent($componentName))
{
$obAjax = null;
if ($bComponentEnabled)
{
if (($arParams['AJAX_MODE'] ?? '') == 'Y')
{
$obAjax = new CComponentAjax($componentName, $componentTemplate, $arParams, $parentComponent);
}
$this->__componentStack[] = $component;
$result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent, $returnResult);
array_pop($this->__componentStack);
}
if ($bDrawIcons)
{
$panel = new CComponentPanel($component, $componentName, $componentTemplate, $parentComponent, $bComponentEnabled);
$arIcons = $panel->GetIcons();
echo $this->IncludeStringAfter($arIcons["icons"], $arIcons["parameters"]);
}
if ($bComponentEnabled && $obAjax)
{
$obAjax->Process();
}
}
if ($bShowDebug)
{
/var/www/leselshop.ru/design/index.php
"SECTION_ID" => "",
"SECTION_TITLE" => "-",
"SEF_MODE" => "Y",
"SEF_RULE" => "/design/#SMART_FILTER_PATH#/",
"SMART_FILTER_PATH" => $_REQUEST["SMART_FILTER_PATH"],
"TEMPLATE_THEME" => "blue",
"XML_EXPORT" => "N"
)
);?>
</div>
</div>
</div>
<div class="col-xs-9 col-sm-9 catalog-list-block">
<h1 class="section-list-h1-count">
<? $APPLICATION->ShowTitle(false); ?>
<span class="abs_count"><? $APPLICATION->ShowViewContent('abs_count');?></span>
</h1>
<?$APPLICATION->IncludeComponent(
"bitrix:catalog.section",
"catalogdesign",
Array(
"CCONFIG" => $CCONFIG,
"ACTION_VARIABLE" => "action",
"ADD_PICT_PROP" => "-",
"ADD_PROPERTIES_TO_BASKET" => "Y",
"ADD_SECTIONS_CHAIN" => $_SERVER['ADD_TO_CHAIN_FROM_OTHER'] ? $_SERVER['ADD_TO_CHAIN_FROM_OTHER'] : 'Y', // GET THIS PARAMETR FROM FILTER.LINKS COMPONENT
"AJAX_MODE" => "N",
"AJAX_OPTION_ADDITIONAL" => "",
"AJAX_OPTION_HISTORY" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "N",
"BACKGROUND_IMAGE" => "-",
"BASKET_URL" => "/personal/basket.php",
"BROWSER_TITLE" => "-",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"CACHE_TIME" => "36000000",
"CACHE_TYPE" => "N",
/var/www/leselshop.ru/bitrix/modules/main/include/urlrewrite.php
}
$ext = strtolower(GetFileExtension($url));
if ($ext != "php")
{
continue;
}
// D7 response is not available here
if (stristr(php_sapi_name(), "cgi") !== false && (!defined("BX_HTTP_STATUS") || !BX_HTTP_STATUS))
{
header("Status: 200 OK");
}
else
{
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
}
$_SERVER["REAL_FILE_PATH"] = $url;
include_once $io->GetPhysicalName($_SERVER['DOCUMENT_ROOT'] . $url);
die();
}
}
}
//admin section 404
if (str_starts_with($requestUri, "/bitrix/admin/"))
{
$_SERVER["REAL_FILE_PATH"] = "/bitrix/admin/404.php";
include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin/404.php";
die();
}
define("BX_CHECK_SHORT_URI", true);
Arguments
"/var/www/leselshop.ru/design/index.php"
/var/www/leselshop.ru/bitrix/urlrewrite.php
<?
include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/urlrewrite.php');
if(file_exists($_SERVER['DOCUMENT_ROOT'].'/404.php'))
include_once($_SERVER['DOCUMENT_ROOT'].'/404.php');
?>
Arguments
"/var/www/leselshop.ru/bitrix/modules/main/include/urlrewrite.php"