Задать вопрос
@Cyber-Pavel

Как с помощью «Умного фильтра» и catalog.section вывести несколько товаров из разных разделов?

Хочу в catalog.section вывести несколько товаров из разных разделов. У меня есть массив с id элементов. И массив с id их раздела.
В префильтре фильтрую по элементам.
$GLOBALS['presect'] = array("ID"=>$arrFiltrId);
в фильтре id раздела ставлю- первый элемент массива, как я понял по другому никак:
"SECTION_ID" => $sectId[0]

bitrix:catalog.smart.filter
<?$APPLICATION->IncludeComponent(
	"bitrix:catalog.smart.filter", 
	"main2", 
	array(
		"COMPONENT_TEMPLATE" => "main2",
		"IBLOCK_TYPE" => "aspro_next_catalog",
		"IBLOCK_ID" => "18",
		"SECTION_ID" => $sectId[0],
		"SECTION_CODE" => "",
		"PREFILTER_NAME" => "presect",

		"FILTER_NAME" => "smartPreFilter",
		"HIDE_NOT_AVAILABLE" => "N",
		"TEMPLATE_THEME" => "blue",
		"FILTER_VIEW_MODE" => "vertical",
		"DISPLAY_ELEMENT_COUNT" => "Y",
		"SEF_MODE" => "N",
		"CACHE_TYPE" => "N",
		"CACHE_TIME" => "36000000",
		"CACHE_GROUPS" => "Y",
		"SAVE_IN_SESSION" => "N",
		"INSTANT_RELOAD" => "Y",
		"PAGER_PARAMS_NAME" => "arrPager",
		"CONVERT_CURRENCY" => "Y",
		"XML_EXPORT" => "N",
		"SECTION_TITLE" => "-",
		"SECTION_DESCRIPTION" => "-",
		"POPUP_POSITION" => "left",
		"SEF_RULE" => "/catalog/#SECTION_ID#/filter/#SMART_FILTER_PATH#/apply/",
		"SECTION_CODE_PATH" => "",
		"SMART_FILTER_PATH" => $_REQUEST["SMART_FILTER_PATH"],
		"CURRENCY_ID" => "RUB",
		"COMPOSITE_FRAME_MODE" => "A",
		"COMPOSITE_FRAME_TYPE" => "AUTO",
		"PRICE_CODE" => array(
			0 => "Интернет магазин (Магазин)",
		),

	false
);?>

bitrix:catalog.section
<?$APPLICATION->IncludeComponent(
                                    "bitrix:catalog.section",
                                    $display,
                                    array(
                                        "ACTION_VARIABLE" => "action",
                                        "ADD_PICT_PROP" => "MORE_PHOTO",
                                        "ADD_PROPERTIES_TO_BASKET" => "Y",
                                        "ADD_SECTIONS_CHAIN" => "N",
                                        "ADD_TO_BASKET_ACTION" => "ADD",
                                        "AJAX_MODE" => "N",
                                        "AJAX_OPTION_ADDITIONAL" => "",
                                        "AJAX_OPTION_HISTORY" => "N",
                                        "AJAX_OPTION_JUMP" => "N",
                                        "AJAX_OPTION_STYLE" => "Y",
                                        "BASKET_URL" => "/personal/cart/",
                                        "BROWSER_TITLE" => "-",
                                        "CACHE_FILTER" => "N",
                                        "CACHE_GROUPS" => "Y",
                                        "CACHE_TIME" => "36000000",
                                        "CACHE_TYPE" => "N",
                                        "COMPONENT_TEMPLATE" => "catalog_block_custom",
                                        "CONVERT_CURRENCY" => "N",
                                        "DETAIL_URL" => "",
                                        "DISPLAY_BOTTOM_PAGER" => "Y",
                                        "DISPLAY_TOP_PAGER" => "N",
                                        "ELEMENT_SORT_FIELD" => "name",
                                        "ELEMENT_SORT_FIELD2" => "shows",
                                        "ELEMENT_SORT_ORDER" => "asc",
                                        "ELEMENT_SORT_ORDER2" => "asc",
                                        "FILTER_NAME" => "smartPreFilter",
                                        "HIDE_NOT_AVAILABLE" => "Y",
                                        "IBLOCK_ID" => "18",
                                        "IBLOCK_TYPE" => "aspro_next_catalog",
                                        "IBLOCK_TYPE_ID" => "catalog",
                                        "INCLUDE_SUBSECTIONS" => "Y",
                                        "LABEL_PROP" => array(
                                            0 => "",
                                        ),
                                        "LINE_ELEMENT_COUNT" => "3",
                                        "MESSAGE_404" => "",
                                        "MESS_BTN_ADD_TO_BASKET" => "В корзину",
                                        "MESS_BTN_BUY" => "Купить",
                                        "MESS_BTN_DETAIL" => "Подробнее",
                                        "MESS_BTN_SUBSCRIBE" => "Подписаться",
                                        "MESS_NOT_AVAILABLE" => "Нет в наличии",
                                        "META_DESCRIPTION" => "-",
                                        "META_KEYWORDS" => "-",
                                        "OFFERS_CART_PROPERTIES" => array(
                                            0 => "COLOR_REF",
                                            1 => "SIZES_SHOES",
                                            2 => "SIZES_CLOTHES",
                                        ),
                                        "OFFERS_FIELD_CODE" => array(
                                            0 => "",
                                            1 => "",
                                        ),
                                        "OFFERS_LIMIT" => "5",
                                        "OFFERS_PROPERTY_CODE" => array(
                                            0 => "",
                                            1 => "",
                                        ),
                                        "OFFERS_SORT_FIELD" => "shows",
                                        "OFFERS_SORT_FIELD2" => "shows",
                                        "OFFERS_SORT_ORDER" => "asc",
                                        "OFFERS_SORT_ORDER2" => "asc",
                                        "OFFER_ADD_PICT_PROP" => "-",
                                        "OFFER_TREE_PROPS" => array(
                                            0 => "COLOR_REF",
                                            1 => "SIZES_SHOES",
                                            2 => "SIZES_CLOTHES",
                                        ),
                                        "PAGER_BASE_LINK_ENABLE" => "N",
                                        "PAGER_DESC_NUMBERING" => "N",
                                        "PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
                                        "PAGER_SHOW_ALL" => "N",
                                        "PAGER_SHOW_ALWAYS" => "N",
                                        "PAGER_TEMPLATE" => "arrows",
                                        "PAGER_TITLE" => "Товары",
                                        "PAGE_ELEMENT_COUNT" => "60",
                                        "PARTIAL_PRODUCT_PROPERTIES" => "Y",
                                        "PRICE_CODE" => array(
                                            0 => "Интернет магазин (Магазин)",
                                        ),
                                        "PRICE_VAT_INCLUDE" => "Y",
                                        "PRODUCT_DISPLAY_MODE" => "Y",
                                        "PRODUCT_ID_VARIABLE" => "id",
                                        "PRODUCT_PROPERTIES" => "",
                                        "PRODUCT_PROPS_VARIABLE" => "prop",
                                        "PRODUCT_QUANTITY_VARIABLE" => "",
                                        "PRODUCT_SUBSCRIPTION" => "N",
                                        "PROPERTY_CODE" => array(
                                            0 => "NEWPRODUCT",

                                        ),
										"SECTION_CODE" => "",
										"SECTION_ID_VARIABLE" => "SECTION_ID",
                                        "SECTION_URL" => "",
                                        "SECTION_USER_FIELDS" => array(
                                            0 => "UF_SECTION_DESCR",
                                            1 => "UF_SECTION_TEMPLATE",
                                            2 => "UF_TIZERS",
                                            3 => "UF_POPULAR",
                                            4 => "UF_CATALOG_ICON",
                                            5 => "UF_OFFERS_TYPE",
                                            6 => "UF_ELEMENT_DETAIL",
                                            7 => "UF_TABLE_SIZES",
                                            8 => "UF_FILTER_VIEW",
                                            9 => "UF_REGION",
                                            10 => "UF_SHORT_PROPERTIES",
                                            11 => "UF_ANALOG_PROPERTY_CODES",
                                            12 => "UF_INDEX_NUMBER",
                                            13 => "",
                                        ),
                                        
                                        "USE_FILTER" => "Y",
                                        "TITLE_BLOCK" => "",
                                        "SHOW_MEASURE" => "Y",
										"SECTION_ID" =>$sectId[0],
                                        "ELEMENT_SORT_FIELD" => $sort,
                                        "PAGE_ELEMENT_COUNT" => $pageCount,
                                          "INCLUDE_SUBSECTIONS" => "Y",
                                        "SHOW_ALL_WO_SECTION" => "Y",
                                    ),
                                    false
                                );?>
  • Вопрос задан
  • 171 просмотр
Подписаться 1 Простой 3 комментария
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы