Answer the question
In order to leave comments, you need to log in
Reviews for a Bitrix product using a separate information block, how to do it?
Hi all.
I can’t solve one question in any way:
There is a site with goods, I created a separate information block otzyvy
created a property for binding elements (to the product).
In the detail view template below, I indicated the code:
$seoItems = array();
$arSectionSelect = array("ID");
$arSectionFilter = array("IBLOCK_ID"=>$arParams["IBLOCK_ID"], "ID"=>$arResult["ID"]);
$dbSectionList = CIBlockElement::GetList(array(), $arSectionFilter, false, $arSectionSelect);
while($arSection = $dbSectionList->GetNext()){
$seoItems = $arSection["ID"];
print_r("$seoItems"); // тут показывает ID элемента, товара
}
$fastUrlsList = array();
$arSelect = Array("ID", "NAME", "PREVIEW_TEXT]");
$arFilter = Array("IBLOCK_ID"=>34, "ACTIVE"=>"Y", "ID"=>$seoItems);
$res = CIBlockElement::GetList(array("SORT"=>"ASC"), $arFilter, false, false, $arSelect);
while($ob = $res->GetNextElement()){
$arFields = $ob->GetFields();
$fastUrlsList[] = array(
"NAME" => $arFields["NAME"],
"PREVIEW_TEXT" => $arFields["PROPERTY_PREVIEW_TEXT_VALUE"],
);
print_r($arFields["NAME"]); // Тут ничего не выводит
print_r($arFields["NAME"]); // Тут ничего не выводит
}
Answer the question
In order to leave comments, you need to log in
$arSelect = Array("ID", "NAME", "PREVIEW_TEXT", "СВОЙСТВО_ПРИВЯЗКА_К_ТОВАРУ");
$arFilter = Array("IBLOCK_ID"=>34, "ACTIVE"=>"Y", "СВОЙСТВО_ПРИВЯЗКА_К_ТОВАРУ"=>$seoItems);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question