В таблице вывода результатов поиска, в файле шалона есть переменная [B]$arResult[/B]. Но вот где она инициалзируется в каком файле не могу понять. Вот код шаблона C:\Bitrix\www\bitrix\templates\Sibitron_beta\components\bitrix\store.catalog.top\[B]beta_catalog.top[/B]. В [B]header.php[/B] её нет.
============================================================
=====================================
<?if(!defined("B_PROLOG_INCLUDED" || B_PROLOG_INCLUDED!==true)die();?>
<div class="catalog-top">
<?if($USER->GetID() == 1){
echo "<pre>"; print_r([COLOR=#FF0000][B]$arResult[/B][/COLOR]); echo "</pre>";
}
?>
<?
//echo "<pre>"; print_r([COLOR=#FF0000][B]$arResult[/B][/COLOR]); echo "</pre>";
foreach([COLOR=#FF0000][B]$arResult[/B][/COLOR]["ROWS"] as $arItems):
?>
<div class="catalog-item-cards">
<!--<table class="catalog-item-card" cellspacing="0">-->
<!--<tr class="top">-->
<?
foreach($arItems as $key => $arElement):
if ($key > 0):
?>
<!-- <td class="delimeter"></td>-->
<?
endif;
?>
<!--<li><?if(is_array($arElement)):?>
<div class="corner left-top"></div><div class="corner right-top"></div>
<div class="border-top"></div><?endif;?></li>-->
<?
endforeach;
?>
<? //echo "<pre>"; print_r($arItems); echo "</pre>";
foreach($arItems as $key => $arElement):
if ($key > 0):
?>
<!--<td class="delimeter"></td>-->
<?
endif;
if(is_array($arElement)):
$bPicture = is_array($arElement["PREVIEW_IMG"]) ;
?>
<div class="catalog_top_item" id="catalog_top_item">
<div class="catalog-item-card<?=$bPicture ? '' : ' no-picture-mode'?>" itemscope itemtype = "http://schema.org/Product">
<div class="catalog_top_title">
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><span itemprop = "name"><?=$arElement["NAME"]?></span></a>
<?if($arElement["IBLOCK_ID"]==9):?>
<?=$arElement["SECTION_NAME_S"];?>
<?elseif($arElement["IBLOCK_ID"]==5):?>
<?=$arElement["SECTION_NAME_S"];?>
<? foreach($arElement["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<?
if(is_array($arProperty["DISPLAY_VALUE"] ;) )
echo implode(" / ", $arProperty["DISPLAY_VALUE"] ;) ;
else
echo $arProperty["DISPLAY_VALUE"];
?>
<? endforeach; ?>
<? endif;?>
</div>
<?
if ($bPicture):
?>
<div class="catalog_left">
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><img border="0" id="productimg" itemprop="image" src="<?=$arElement["PREVIEW_IMG"]["SRC"]?>" width="<?=$arElement["PREVIEW_IMG"]["WIDTH"]?>" height="<?=$arElement["PREVIEW_IMG"]["HEIGHT"]?>" alt="<?=$arElement["NAME"]?>" title="<?=$arElement["NAME"]?>" id="catalog_list_image_<?=$arElement['ID']?>" /></a>
</div>
<? else: ?>
<div class="catalog_left">
<a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><img border="0" id="productimg" itemprop="image" src="/bitrix/templates/Sibitron_beta/images/nofot.jpg" width="<?=$arElement["PREVIEW_IMG"]["WIDTH"]?>" height="<?=$arElement["PREVIEW_IMG"]["HEIGHT"]?>" alt="<?=$arElement["NAME"]?>" title="<?=$arElement["NAME"]?>" id="catalog_list_image_<?=$arElement['ID']?>" /></a>
</div>
<?
endif;
?>
<div class="catalog_right">
<!--<p class="item-article">
Артикул: <?//=$arElement["ID"]; ?>
</p>-->
<p class="item-desc">
<?
/* foreach($arElement["DISPLAY_PROPERTIES"] as $pid=>$arProperty):
?>
<small><?=$arProperty["NAME"]?>: <?
if(is_array($arProperty["DISPLAY_VALUE"] ;) )
echo implode(" / ", $arProperty["DISPLAY_VALUE"] ;) ;
else
echo $arProperty["DISPLAY_VALUE"];
?></small><br />
<?
endforeach;*/
?>
<span itemprop = "description"><?//=strip_tags($arElement["PREVIEW_TEXT"] ;) ;?></span>
<span class="item-desc-overlay"></span>
</p>
<?
if(count($arElement["PRICES"] ;) >0 && $arElement['PROPERTIES']['MAXIMUM_PRICE']['VALUE'] == $arElement['PROPERTIES']['MINIMUM_PRICE']['VALUE'] ;) :
foreach($arElement["PRICES"] as $code=>$arPrice):
if($arPrice["CAN_ACCESS"] ;) :
?>
<p class="item-price">
<span itemprop = "offers" itemscope itemtype = "http://schema.org/Offer">
<?
if($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"] ;) :
?> <div style="float:left;width:100px;margin-top: -12px;">
<p class="discount_price"><span><s><span><?=$arPrice["PRINT_VALUE"]?></span></s></p>
<p class="catalog_top_price"><span><?=$arPrice["PRINT_DISCOUNT_VALUE"]?></span></p>
</div>
<?
else:
?> <!--<div class="catalog_top_count">
<a href="javascript:void(0);" onclick="changecount('<?=$arElement['ID'];?>', 'minus')" class="catalog_top_count_minus"><img src="/bitrix/templates/images/minus.png" /></a>
<input class="catalog_top_count_i" id="catalog_top_count_i_<?=$arElement['ID'];?>" value="1" size="1">
<a href="javascript:void(0);" onclick="changecount('<?=$arElement['ID'];?>', 'plus')" class="catalog_top_count_plus"><img src="/bitrix/templates/images/plus.png" /></a>
</div> -->
<p class="catalog_top_price"><span><?=$arPrice["PRINT_VALUE"]?></span></p>
<?
endif;
?>
<div class="catalog-item-links">
<a href="javascript:void(0);" <?if($arElement['INBASKETCOUNT']>0):?>style="display:none;"<?endif;?>class="catalog_item_buy" id="AddToBasket<?=$arElement['ID']?>" onclick="Add2basket('<?=$arElement['ID']; ?>');" element_id="<?=$arElement['ID']?>" path="<?= $arElement['DETAIL_PAGE_URL']; ?>">
<img src="/bitrix/templates/images/corzin.png" class="catalog_top_buy"></a>
</div>
<div class="catalog-item-links">
<a href="/personal/cart" <?if($arElement['INBASKETCOUNT']==0):?>style="display:none;"<?endif;?> class="catalog_item_buy" id="InBasketYet<?=$arElement['ID']?>" >
<img src="/bitrix/templates/images/corzin01.png" class="catalog_top_buy"></a>
</div>
<?
endif;
endforeach;
else:
$price_from = '';
if($arElement['PROPERTIES']['MAXIMUM_PRICE']['VALUE'] > $arElement['PROPERTIES']['MINIMUM_PRICE']['VALUE'] ;)
{
$price_from = GetMessage("CR_PRICE_OT" ;) ;
}
CModule::IncludeModule("sale" ;)
?>
<!--<p class="catalog_top_price"><span><?//=$price_from?><?//=FormatCurrency($arElement['PROPERTIES']['MINIMUM_PRICE']['VALUE'], CSaleLang::GetLangCurrency(SITE_ID))?></span></p>
-->
<?
endif;
?>
</div>
<?if (isset($arElement["OFFERS"] ;) ):?>
<div class="catalog-offers">
<?foreach($arElement["OFFERS"] as $arOffer):?>
<?foreach($arParams["OFFERS_FIELD_CODE"] as $field_code):?>
<small><?echo GetMessage("IBLOCK_FIELD_".$field_code)?>: <?
echo $arOffer[$field_code];?></small><br />
<?endforeach;?>
<?foreach($arOffer["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<small><?=$arProperty["NAME"]?>: <?
if(is_array($arProperty["DISPLAY_VALUE"] ;) )
echo implode(" / ", $arProperty["DISPLAY_VALUE"] ;) ;
else
echo $arProperty["DISPLAY_VALUE"];?></small><br />
<?endforeach?>
<?foreach($arOffer["PRICES"] as $code=>$arPrice):?>
<?if($arPrice["CAN_ACCESS"] ;) :?>
<?=[COLOR=#FF0000][B]$arResult[/B][/COLOR]["PRICES"][$code]["TITLE"];?>:
<?if($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"] ;) :?>
<s><?=$arPrice["PRINT_VALUE"]?></s> <span class="catalog-price"><?=$arPrice["PRINT_DISCOUNT_VALUE"]?></span>
<?else:?>
<span class="catalog-price"><?=$arPrice["PRINT_VALUE"]?></span>
<?endif?>
<?endif;?>
<?endforeach;
endforeach;?>
</div>
<?endif;?>
</div>
</div>
<?
else:
?>
<!-- <td class="delimeter"></td>-->
<?
endif;
?>
<?
endforeach;
?>
<!-- </tr>
<tr class="bottom"> -->
<?
foreach($arItems as $key => $arElement):
if ($key > 0):
?>
<!--<td class="delimeter"></td>-->
<?
endif;
?>
<!--<li><?if(is_array($arElement)):?><div class="corner left-bottom"></div><div class="corner right-bottom"></div><div class="border-bottom"></div><?endif;?></li>-->
<?
endforeach;
?>
<!--</tr>-->
<!-- </table>-->
</div>
<?
endforeach;
?>
</div>
============================================================
=================================