if(CModule::IncludeModule("iblock")){
$arSelect = Array("ID", "IBLOCK_ID", "NAME", "DATE_ACTIVE_FROM");
$arrFilterMain["PROPERTY_CATMAIN_PROD_VALUE"]= "Не популярные";
$res = CIBlockElement::GetList(
Array(),
$arrFilterMain,
false,
Array("nPageSize"=>50),
$arSelect
);
while($ob = $res->GetNextElement()){
$arFields = $ob->GetFields();
debug($arFields);
$arProps = $ob->GetProperties();
debug($arProps);
}
}
?>