В таблице вывода результатов поиска, в файле шалона есть переменная
$arResult . Но вот где она инициалзируется в каком файле не могу понять. Вот код шаблона C:\Bitrix\www\bitrix\templates\Sibitron_beta\components\bitrix
\store.catalog.top\
beta_catalog.top . В
header.php её нет.
============================================================
=====================================
<?if(!defined("B_PROLOG_INCLUDED" || B_PROLOG_INCLUDED!==true)die();?>
<div class="catalog-top">
<?if($USER->GetID() == 1){
echo "<pre>"; print_r(
$arResult ); echo "</pre>";
}
?>
<?
//echo "<pre>"; print_r(
$arResult ); echo "</pre>";
foreach(
$arResult ["ROWS"] as $arItems):
?>
<div class="catalog-item-cards">
<!--
--> <!----> <? foreach($arItems as $key => $arElement): if ($key > 0): ?> <!-- --> <? endif; ?> <!--[*]<?if(is_array($arElement)):?> <div class="corner left-top"></div><div class="corner right-top"></div> <div class="border-top"></div><?endif;?>--> <? endforeach; ?> <? //echo "<pre>"; print_r($arItems); echo "</pre>"; foreach($arItems as $key => $arElement): if ($key > 0): ?> <!-- --> <? 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"> "><span itemprop = "name"><?=$arElement["NAME"]?></span>
<?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"> "><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']?>" /> </div> <? else: ?> <div class="catalog_left"> ">" height="<?=$arElement["PREVIEW_IMG"]["HEIGHT"]?>" alt="<?=$arElement["NAME"]?>" title="<?=$arElement["NAME"]?>" id="catalog_list_image_<?=$arElement['ID']?>" /> </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><span><?=$arPrice["PRINT_VALUE"]?></span> </p> <p class="catalog_top_price"><span><?=$arPrice["PRINT_DISCOUNT_VALUE"]?></span></p> </div> <? else: ?> <!--<div class="catalog_top_count"> ', 'minus')" class="catalog_top_count_minus"> <input class="catalog_top_count_i" id="catalog_top_count_i_<?=$arElement['ID'];?>" value="1" size="1"> ', 'plus')" class="catalog_top_count_plus"> </div> --> <p class="catalog_top_price"><span><?=$arPrice["PRINT_VALUE"]?></span></p> <? endif; ?> <div class="catalog-item-links"> 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']; ?>"> </div> <div class="catalog-item-links"> style="display:none;"<?endif;?> class="catalog_item_buy" id="InBasketYet<?=$arElement['ID']?>" > </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"] ;) :?> <?=$arResult ["PRICES"][$code]["TITLE"];?>: <?if($arPrice["DISCOUNT_VALUE"] < $arPrice["VALUE"] ;) :?> <?=$arPrice["PRINT_VALUE"]?> <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: ?> <!-- --> <? endif; ?> <? endforeach; ?> <!-- --> <? foreach($arItems as $key => $arElement): if ($key > 0): ?> <!-- --> <? endif; ?> <!--[*]<?if(is_array($arElement)):?><div class="corner left-bottom"></div><div class="corner right-bottom"></div><div class="border-bottom"></div><?endif;?>--> <? endforeach; ?> <!-- --> <!--
-->
</div>
<?
endforeach;
?>
</div>
============================================================
=================================