Answer the question
In order to leave comments, you need to log in
How to display popular Bitrix elements?
$arFilter = Array("IBLOCK_ID"=>2, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y", "PROPERTY_SALELEADER_VALUE_XML_ID"=>"YYY");
$result = CIBlockElement::GetList(Array(), $arFilter, false, Array("nTopCount"=>7), Array());
Answer the question
In order to leave comments, you need to log in
however, how sure do you want to filter by value_xml_id when there is no filter by that value :)
filter by property value. and since you use Cyrillic, then follow the encoding.
<?
$arSelect = Array("ID", "NAME", "DETAIL_PAGE_URL", "IBLOCK_ID");
$arFilter = Array("IBLOCK_ID"=>2, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y", "PROPERTY_SALELEADER_VALUE"=>"да");
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>50), $arSelect);
while($ob = $res->GetNextElement())
{
$arFields = $ob->GetFields();
print_r($arFields);
}
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question