Коллеги, добрый день. Настроил в инфоблоке свойство привязка к элементам, все данные указал. Тип множественный.
У товара сделал привязку к другим товарам.
На странице detail.php после вывода детальной карточки товара сделал след.
свойство привязка к элементам называется - RECOOM
id инфоблока 14
товары лежат без разделов
<? GLOBAL $arrFilterProduct;
$idsRecom = array();
$res = CIBlockElement::GetProperty(14,$_REQUEST["ELEMENT_ID"], "sort", "asc", Array("CODE"=>"RECOOM"));
while ($ar_res = $res->GetNext()) {
$idsRecom[] = $ar_res['VALUE'];
}
if ( !empty($idsRecom[0]) ) {
$arrFilterProduct = array("ID" => $idsRecom );
} else {
}
$APPLICATION->IncludeComponent(
"bitrix:catalog.top",
"recco",
array(
"IBLOCK_TYPE" => "catalog",
"IBLOCK_ID" => "14",
"ELEMENT_SORT_FIELD" => "sort",
"ELEMENT_SORT_ORDER" => "asc",
"ELEMENT_SORT_FIELD2" => "name",
"ELEMENT_SORT_ORDER2" => "desc",
"FILTER_NAME" => "arrFilterProduct",
"HIDE_NOT_AVAILABLE" => "N",
"ELEMENT_COUNT" => "9",
"LINE_ELEMENT_COUNT" => "3",
"PROPERTY_CODE" => array(
0 => "new",
1 => "collection",
2 => "more_photo",
3 => "",
),
"OFFERS_FIELD_CODE" => array(
0 => "",
1 => "",
),
"OFFERS_PROPERTY_CODE" => array(
0 => "",
1 => "",
),
"OFFERS_SORT_FIELD" => "sort",
"OFFERS_SORT_ORDER" => "asc",
"OFFERS_SORT_FIELD2" => "id",
"OFFERS_SORT_ORDER2" => "desc",
"OFFERS_LIMIT" => "0",
"VIEW_MODE" => "SECTION",
"TEMPLATE_THEME" => "blue",
"PRODUCT_DISPLAY_MODE" => "N",
"ADD_PICT_PROP" => "-",
"LABEL_PROP" => "-",
"SHOW_DISCOUNT_PERCENT" => "Y",
"SHOW_OLD_PRICE" => "Y",
"MESS_BTN_BUY" => "Купить",
"MESS_BTN_ADD_TO_BASKET" => "В корзину",
"MESS_BTN_DETAIL" => "",
"MESS_NOT_AVAILABLE" => "Нет в наличии",
"SECTION_URL" => "",
"DETAIL_URL" => "",
"SECTION_ID_VARIABLE" => "SECTION_ID",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_GROUPS" => "N",
"DISPLAY_COMPARE" => "N",
"CACHE_FILTER" => "N",
"PRICE_CODE" => array(
0 => "BASE",
),
"USE_PRICE_COUNT" => "N",
"SHOW_PRICE_COUNT" => "1",
"PRICE_VAT_INCLUDE" => "N",
"CONVERT_CURRENCY" => "Y",
"CURRENCY_ID" => "RUB",
"BASKET_URL" => "/personal/cart/index.php",
"ACTION_VARIABLE" => "action",
"PRODUCT_ID_VARIABLE" => "id",
"USE_PRODUCT_QUANTITY" => "N",
"ADD_PROPERTIES_TO_BASKET" => "Y",
"PRODUCT_PROPS_VARIABLE" => "prop",
"PARTIAL_PRODUCT_PROPERTIES" => "N",
"PRODUCT_PROPERTIES" => array(
),
"OFFERS_CART_PROPERTIES" => array(
),
"PRODUCT_QUANTITY_VARIABLE" => "quantity",
"COMPONENT_TEMPLATE" => "monaliza_catalog_top_slide",
"SEF_MODE" => "N",
"CUSTOM_FILTER" => "",
"HIDE_NOT_AVAILABLE_OFFERS" => "N",
"COMPATIBLE_MODE" => "Y"
),
false
);?>
Хочу просто отфильтровать по свойству. Подскажите, что делаю не так?