if CModule IncludeModule catalog arFilter array IBLOCK_ID 114 ACTIVE v

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
if(CModule::IncludeModule("catalog")){
$arFilter = array(
"IBLOCK_ID" => 114,
"ACTIVE" => "Y",
);
var_dump($arFilter);
$arSelect = Array("ID", "IBLOCK_ID", "NAME","SHOW_COUNTER", "PROPERTY_rating");//IBLOCK_ID и ID обязательно должны быть указаны, см. описание arSelectFields выше
$arFilter = Array("IBLOCK_ID"=>IntVal(114), "ACTIVE"=>"Y" );
var_dump($arFilter);
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array(), $arSelect);
echo "<pre>";
$x = 0;
while($ob = $res->GetNextElement()){
$arFields = $ob->GetFields();
var_dump($arFields);
$x++;
}
echo " ----- ".$x;
echo "</pre>";
}