Фильтр
$IBLOCK_ID, "ACTIVE" => "Y", "SECTION_ID" => 96); $arItems = CIBlockElement::GetList(array("SORT" => "ASC"), $arFilter, false, false, $arSelect); $arElementLink = array(); $elementsID = array(); while ($arElement = $arItems->GetNext()){ $arResult[] = $arElement; } if (!empty($arResult)){ foreach ($arResult as $key => $item){ $arResult[$key]["PROPERTIES"] = array(); $arElementLink[$item["ID"]] = &$arResult[$key]; $elementsID[$key] = $item["ID"]; } $arPropFilter = array( "ID" => $elementsID, "IBLOCK_ID" => $arFilter["IBLOCK_ID"], ); CIBlockElement::GetPropertyValuesArray($arElementLink, $arFilter["IBLOCK_ID"], $arPropFilter, []); foreach ($arResult as $key => $arItem){ if (!empty($arItem["PROPERTIES"])){ foreach ($arItem["PROPERTIES"] as $code => $arProperty){ echo $arItem["PROPERTIES"][$code]["ID"] . "
"; // CIBlockSectionPropertyLink::Delete(0, $arItem["PROPERTIES"][$code]["ID"]); if ((is_array($arProperty["VALUE"]) && !empty($arProperty["VALUE"])) || (!is_array($arProperty["VALUE"]) && strlen($arProperty["VALUE"]) > 0)){ $arProperties[$code] = CIBlockFormatProperties::GetDisplayValue( array( "ID" => $arItem["ID"], "NAME" => $arItem["NAME"]), $arProperty, "" ); } if($arProperty["VALUE"] && $arProperty["FILTRABLE"] == "Y"){ if(!isset($property[$code])){ $property[$code]["VALUES"][$arProperty["VALUE"]] = $arProperty["VALUE"]; $property[$code]["PROPERTY_TYPE"] = $arProperty["PROPERTY_TYPE"]; $property[$code]["NAME"] = $arProperty["NAME"]; }else{ if($property[$code]["VALUES"] != $arProperty["VALUE"]){ $property[$code]["VALUES"][$arProperty["VALUE"]] = $arProperty["VALUE"]; } } } // } } break; } if($_REQUEST["dostupnost"] === "podzakaz"){ $podzakazSel = "selected"; }else{ $podzakazSel = ""; } if($_REQUEST["dostupnost"] === "vnalichii"){ $nalichieSel = "selected"; }else{ $nalichieSel = ""; } echo "

Доступность

"; foreach($property as $key => $propItem){ if($propItem != NULL){ if($propItem["PROPERTY_TYPE"] == "S"){ echo "

". $propItem["NAME"] . "

"; } if($propItem["PROPERTY_TYPE"] == "N"){ echo "

". $propItem["NAME"] . "

"; } if($propItem["PROPERTY_TYPE"] == "L"){ echo "

". $propItem["NAME"] . "

"; } } } } echo "
Сбросить
"; } } ?>