$bOffersIBlockExist = $arCatalog['CATALOG_TYPE'] == CCatalogSKU::TYPE_PRODUCT || $arCatalog['CATALOG_TYPE'] == CCatalogSKU::TYPE_FULL; $boolNeedCatalogCache = true; } } $arResult['CATALOG'] = $arCatalog; //This function returns array with prices description and access rights //in case catalog module n/a prices get values from element properties $arResult["PRICES"] = CIBlockPriceTools::GetCatalogPrices($arParams["IBLOCK_ID"], $arParams["PRICE_CODE"]); $arResult['PRICES_ALLOW'] = CIBlockPriceTools::GetAllowCatalogPrices($arResult["PRICES"]); if ($bCatalog && $boolNeedCatalogCache && !empty($arResult['PRICES_ALLOW'])) { $boolNeedCatalogCache = CIBlockPriceTools::SetCatalogDiscountCache($arResult['PRICES_ALLOW'], $USER->GetUserGroupArray()); } $arResult['CONVERT_CURRENCY'] = $arConvertParams; if ($arResult["ID"] > 0) { $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($arResult["IBLOCK_ID"], $arResult["ID"]); $arResult["IPROPERTY_VALUES"] = $ipropValues->getValues(); } else { $arResult["IPROPERTY_VALUES"] = array(); } $arResult["PICTURE"] = CFile::GetFileArray($arResult["PICTURE"]); if ($arResult["PICTURE"]) { if ($arResult["ID"] > 0) { $arResult["PICTURE"]["ALT"] = $arResult["IPROPERTY_VALUES"]["SECTION_PICTURE_FILE_ALT"]; } if ($arResult["PICTURE"]["ALT"] == "") { $arResult["PICTURE"]["ALT"] = $arResult["NAME"]; } if ($arResult["ID"] > 0) { $arResult["PICTURE"]["TITLE"] = $arResult["IPROPERTY_VALUES"]["SECTION_PICTURE_FILE_TITLE"]; } if ($arResult["PICTURE"]["TITLE"] == "") {
<input type="text" id="ajax-search" onkeypress="if (event.keyCode == 13) ajaxsearch_cat()" placeholder="Быстрый поиск"/> <input type="submit" id="ajax-search-button" onclick="ajaxsearch_cat()" value="Искать"/> </div> <? //Получаем свойства раздела $sect_sport = CIBlockSection::GetByID(1); if($ar_sect_sport = $sect_sport->GetNext()) { //Получаем СЕО текст раздела $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues( $ar_sect_sport["IBLOCK_ID"], $ar_sect_sport["ID"] ); $ar_sect_sport["IPROPERTY_VALUES"] = $ipropValues->getValues(); //echo "<pre>"; print_r($ar_sect_sport); echo '</pre>'; } $iblok_id = '2'; $category = $_SERVER['REQUEST_URI']; $category = explode("?", $category); $category = explode("/", $category[0]); ?> <? $array_empty = array(''); $cat = array(); $category = array_diff($category, $array_empty); foreach($category as $item): array_push($cat ,$item);
} else { unset($res["PAGE"][$code]); } } if ($res["PAGE"]) { global $SectionPageProperties; $SectionPageProperties = $res["PAGE"]; } } /* $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($arParams["IBLOCK_ID"], IntVal($arResult["VARIABLES"]["SECTION_ID"])); $values=$ipropValues->getValues(); $ishop_page_title=$values['SECTION_META_TITLE']?$values['SECTION_META_TITLE']:$res["NAME"]; $ishop_page_h1=$values['SECTION_PAGE_TITLE']?$values['SECTION_PAGE_TITLE']:$res["NAME"]; $APPLICATION->SetTitle($ishop_page_title);*/ $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($arParams["IBLOCK_ID"], IntVal($arResult["VARIABLES"]["SECTION_ID"])); $values = $ipropValues->getValues(); $ishop_page_title = $values['SECTION_META_TITLE'] ? $values['SECTION_META_TITLE'] : $arSection["NAME"]; $ishop_page_h1 = $values['SECTION_PAGE_TITLE'] ? $values['SECTION_PAGE_TITLE'] : $arSection["NAME"]; $APPLICATION->SetTitle($ishop_page_h1); $APPLICATION->SetPageProperty("title", $ishop_page_title); if ($values['SECTION_META_DESCRIPTION']) { $APPLICATION->SetPageProperty("description", $values['SECTION_META_DESCRIPTION']); } if ($values['SECTION_META_KEYWORDS']) { $APPLICATION->SetPageProperty("keywords", $values['SECTION_META_KEYWORDS']); } ?> <h1 class="title"><?php echo $ishop_page_h1; ?> </h1>
"ACTIVE" => "Y", ); $rsSection = CIBlockSection::GetList(Array(),$arSectionFilter); $rsSection->SetUrlTemplates("", $arParams["SECTION_URL"]); $arSection = $rsSection->GetNext(); } if($arSection) { $arSection["PATH"] = array(); $rsPath = CIBlockSection::GetNavChain($arResult["IBLOCK_ID"], $arSection["ID"]); $rsPath->SetUrlTemplates("", $arParams["SECTION_URL"]); while($arPath = $rsPath->GetNext()) { $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($arParams["IBLOCK_ID"], $arPath["ID"]); $arPath["IPROPERTY_VALUES"] = $ipropValues->getValues(); $arSection["PATH"][] = $arPath; } $arResult["SECTION"] = $arSection; } if ($bCatalog && $bIBlockCatalog) { if (!isset($arResult["CATALOG_MEASURE_RATIO"])) $arResult["CATALOG_MEASURE_RATIO"] = 1; if (!isset($arResult['CATALOG_MEASURE'])) $arResult['CATALOG_MEASURE'] = 0; $arResult['CATALOG_MEASURE'] = (int)$arResult['CATALOG_MEASURE']; if (0 > $arResult['CATALOG_MEASURE']) $arResult['CATALOG_MEASURE'] = 0; if (!isset($arResult['CATALOG_MEASURE_NAME']))
function category_cat_URL($whe_city,$category) { CModule::IncludeModule("iblock"); $arSelect = Array("ID", "IBLOCK_ID", "NAME", "DATE_ACTIVE_FROM","CODE");//IBLOCK_ID и ID обязательно должны быть указаны, см. описание arSelectFields выше $arFilter = Array("IBLOCK_ID"=>1, "ID"=>$category, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y"); $res = CIBlockElement::GetList(Array(), $arFilter, false, false, $arSelect); while($ob = $res->GetNextElement()){ $arFields = $ob->GetFields(); $arProps = $ob->GetProperties(); } $sect_sport = CIBlockSection::GetByID(1); if($ar_sect_sport = $sect_sport->GetNext()) { //Получаем СЕО текст раздела $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues( $ar_sect_sport["IBLOCK_ID"], $ar_sect_sport["ID"] ); $ar_sect_sport["IPROPERTY_VALUES"] = $ipropValues->getValues(); } //URL TEXT return "/".$whe_city."/".$ar_sect_sport['CODE']."/".$arFields['CODE'].'/'; }
$arResult["SECTION"]["PATH"][] = $arPath; } } else { $arResult["SECTION"] = array("ID" => 0, "DEPTH_LEVEL" => 0); $arFilter["<=" . "DEPTH_LEVEL"] = $arParams["TOP_DEPTH"]; } $intSectionDepth = $arResult["SECTION"]['DEPTH_LEVEL']; //ORDER BY $arSort = array("left_margin" => "asc"); $boolPicture = empty($arSelect) || in_array('PICTURE', $arSelect); //EXECUTE $rsSections = CIBlockSection::GetList($arSort, $arFilter, $arParams["COUNT_ELEMENTS"], $arSelect); $rsSections->SetUrlTemplates("", $arParams["SECTION_URL"]); while ($arSection = $rsSections->GetNext()) { $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($arSection["IBLOCK_ID"], $arSection["ID"]); $arSection["IPROPERTY_VALUES"] = $ipropValues->getValues(); if ($boolPicture) { $mxPicture = false; $arSection["PICTURE"] = intval($arSection["PICTURE"]); if (0 < $arSection["PICTURE"]) { $mxPicture = CFile::GetFileArray($arSection["PICTURE"]); } $arSection["PICTURE"] = $mxPicture; if ($arSection["PICTURE"]) { $arSection["PICTURE"]["ALT"] = $arSection["IPROPERTY_VALUES"]["SECTION_PICTURE_FILE_ALT"]; if ($arSection["PICTURE"]["ALT"] == "") { $arSection["PICTURE"]["ALT"] = $arSection["NAME"]; } $arSection["PICTURE"]["TITLE"] = $arSection["IPROPERTY_VALUES"]["SECTION_PICTURE_FILE_TITLE"]; if ($arSection["PICTURE"]["TITLE"] == "") { $arSection["PICTURE"]["TITLE"] = $arSection["NAME"];
/** * @return array */ public function getMeta() { $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($this->infoblock()->id(), $this->id()); return $ipropValues->getValues(); }
while ($arPath = $rsPath->GetNext()) { $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($arParams['IBLOCK_ID'], $arPath['ID']); $arPath['IPROPERTY_VALUES'] = $ipropValues->getValues(); $arResult['SECTION']['PATH'][] = $arPath; } } else { $arResult['SECTION'] = array('ID' => 0, 'DEPTH_LEVEL' => 0); $arFilter['<=' . 'DEPTH_LEVEL'] = $arParams['TOP_DEPTH']; } $intSectionDepth = $arResult['SECTION']['DEPTH_LEVEL']; $arSort = array('left_margin' => 'asc'); $rsSections = CIBlockSection::GetList($arSort, $arFilter, $arParams['COUNT_ELEMENTS'], $arSelect); $rsSections->SetUrlTemplates('', $arParams['SECTION_URL']); while ($arSection = $rsSections->GetNext()) { $ipropValues = new \Bitrix\Iblock\InheritedProperty\SectionValues($arSection['IBLOCK_ID'], $arSection['ID']); $arSection['IPROPERTY_VALUES'] = $ipropValues->getValues(); if ($boolPicture) { $mxPicture = false; $arSection['PICTURE'] = intval($arSection['PICTURE']); if (0 < $arSection['PICTURE']) { $mxPicture = CFile::GetFileArray($arSection['PICTURE']); } $arSection['PICTURE'] = $mxPicture; if ($arSection['PICTURE']) { $arSection['PICTURE']['ALT'] = $arSection['IPROPERTY_VALUES']['SECTION_PICTURE_FILE_ALT']; if ($arSection['PICTURE']['ALT'] == '') { $arSection['PICTURE']['ALT'] = $arSection['NAME']; } $arSection['PICTURE']['TITLE'] = $arSection['IPROPERTY_VALUES']['SECTION_PICTURE_FILE_TITLE']; if ($arSection['PICTURE']['TITLE'] == '') { $arSection['PICTURE']['TITLE'] = $arSection['NAME'];