$iblockId = $arParams["REVIEW_IBLOCK_ID"];
$properties = $elements = [];
$iterator = \Bitrix\Iblock\PropertyTable::getList([
'select' => ['CODE'],
'filter' => ['IBLOCK_ID' => $iblockId, 'ACTIVE' => 'Y'],
]);
while($row = $iterator->fetch()) {
$propertyCode = $row['CODE'];
if(strpos($propertyCode, 'UF_404_') !== false) {
$properties[] = 'PROPERTY_'.$propertyCode;
}
}
$arSelect = Array("ID", "IBLOCK_ID", "DETAIL_TEXT");
$arSelect = array_merge($arSelect, $properties);
$arFilter = Array("IBLOCK_ID" => $iblockId, "CODE" => !empty($arParams["USE_SKU"]) ? $arBaseProduct["ID"] : $arResult["ID"]);
$res = CIBlockElement::GetList(Array("SORT" => "ASC", "CREATED_DATE"), $arFilter, false, false, $arSelect);