Задать вопрос
  • Как получить ID раздела в битрикс каталоге при включенном аякс?

    @Sandmansss Автор вопроса
    <?
    require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
    $APPLICATION->SetTitle("Жалюзи");
    ?><?$APPLICATION->IncludeComponent(
    	"bitrix:catalog", 
    	"catalog_material", 
    	array(
    		"ACTION_VARIABLE" => "action",
    		"ADD_ELEMENT_CHAIN" => "Y",
    		"ADD_PICT_PROP" => "ATT_IMAGE",
    		"ADD_PROPERTIES_TO_BASKET" => "Y",
    		"ADD_SECTIONS_CHAIN" => "Y",
    		"AJAX_MODE" => "Y",
    		"AJAX_OPTION_ADDITIONAL" => "",
    		"AJAX_OPTION_HISTORY" => "Y",
    		"AJAX_OPTION_JUMP" => "N",
    		"AJAX_OPTION_STYLE" => "Y",
    		"BASKET_URL" => "/personal/basket.php",
    		"BIG_DATA_RCM_TYPE" => "personal",
    		"CACHE_FILTER" => "N",
    		"CACHE_GROUPS" => "Y",
    		"CACHE_TIME" => "36000000",
    		"CACHE_TYPE" => "A",
    		"COMMON_ADD_TO_BASKET_ACTION" => "ADD",
    		"COMMON_SHOW_CLOSE_POPUP" => "N",
    		"COMPATIBLE_MODE" => "N",
    		"COMPONENT_TEMPLATE" => "catalog_material",
    		"CONVERT_CURRENCY" => "N",
    		"DETAIL_ADD_DETAIL_TO_SLIDER" => "N",
    		"DETAIL_ADD_TO_BASKET_ACTION" => array(
    			0 => "BUY",
    		),
    		"DETAIL_ADD_TO_BASKET_ACTION_PRIMARY" => array(
    			0 => "BUY",
    		),
    		"DETAIL_BACKGROUND_IMAGE" => "-",
    		"DETAIL_BRAND_USE" => "N",
    		"DETAIL_BROWSER_TITLE" => "NAME",
    		"DETAIL_CHECK_SECTION_ID_VARIABLE" => "N",
    		"DETAIL_DETAIL_PICTURE_MODE" => array(
    			0 => "POPUP",
    		),
    		"DETAIL_DISPLAY_NAME" => "Y",
    		"DETAIL_DISPLAY_PREVIEW_TEXT_MODE" => "H",
    		"DETAIL_IMAGE_RESOLUTION" => "1by1",
    		"DETAIL_MAIN_BLOCK_PROPERTY_CODE" => array(
    			0 => "ATT_NAME",
    			1 => "ATT_ART",
    			2 => "ATT_ED",
    			3 => "ATT_PROZR",
    			4 => "ATT_SHIR_POLOSY",
    			5 => "ATT_SOSTAV",
    			6 => "ATT_SHIR",
    			7 => "ATT_STRUCTURE",
    			8 => "ATT_FIRE",
    			9 => "ATT_DEPTH",
    			10 => "ATT_CHISTKA",
    			11 => "ATT_FASOVKA",
    			12 => "ATT_FASOVKA_BIG",
    			13 => "ATT_COLOR",
    			14 => "ATT_COUNTY",
    			15 => "ATT_VES",
    			16 => "ATT_PRINT",
    			17 => "ATT_DOP",
    			18 => "ATT_SERT",
    			19 => "ATT_IMAGE",
    		),
    		"DETAIL_META_DESCRIPTION" => "-",
    		"DETAIL_META_KEYWORDS" => "-",
    		"DETAIL_PRODUCT_INFO_BLOCK_ORDER" => "props,sku",
    		"DETAIL_PRODUCT_PAY_BLOCK_ORDER" => "rating,price,priceRanges,quantityLimit,quantity,buttons",
    		"DETAIL_SET_CANONICAL_URL" => "Y",
    		"DETAIL_SET_VIEWED_IN_COMPONENT" => "N",
    		"DETAIL_SHOW_POPULAR" => "N",
    		"DETAIL_SHOW_SLIDER" => "N",
    		"DETAIL_SHOW_VIEWED" => "N",
    		"DETAIL_STRICT_SECTION_CHECK" => "N",
    		"DETAIL_USE_COMMENTS" => "N",
    		"DETAIL_USE_VOTE_RATING" => "N",
    		"DISABLE_INIT_JS_IN_COMPONENT" => "N",
    		"DISPLAY_BOTTOM_PAGER" => "Y",
    		"DISPLAY_TOP_PAGER" => "Y",
    		"ELEMENT_SORT_FIELD" => "sort",
    		"ELEMENT_SORT_FIELD2" => "id",
    		"ELEMENT_SORT_ORDER" => "asc",
    		"ELEMENT_SORT_ORDER2" => "desc",
    		"FILTER_FIELD_CODE" => array(
    			0 => "",
    			1 => "",
    		),
    		"FILTER_HIDE_ON_MOBILE" => "N",
    		"FILTER_NAME" => "",
    		"FILTER_PRICE_CODE" => "",
    		"FILTER_PROPERTY_CODE" => array(
    			0 => "ATT_ED",
    			1 => "ATT_PROZR",
    			2 => "ATT_SOSTAV",
    			3 => "ATT_SHIR",
    			4 => "ATT_STRUCTURE",
    			5 => "ATT_CHISTKA",
    			6 => "ATT_FASOVKA_BIG",
    			7 => "ATT_COLOR",
    			8 => "ATT_COUNTY",
    			9 => "ATT_PRINT",
    			10 => "ATT_DOP",
    			11 => "ATT_DRY",
    			12 => "ATT_LIGHT",
    			13 => "ATT_FIRE",
    			14 => "",
    		),
    		"FILTER_VIEW_MODE" => "VERTICAL",
    		"GIFTS_DETAIL_BLOCK_TITLE" => "Выберите один из подарков",
    		"GIFTS_DETAIL_HIDE_BLOCK_TITLE" => "N",
    		"GIFTS_DETAIL_PAGE_ELEMENT_COUNT" => "4",
    		"GIFTS_DETAIL_TEXT_LABEL_GIFT" => "Подарок",
    		"GIFTS_MAIN_PRODUCT_DETAIL_BLOCK_TITLE" => "Выберите один из товаров, чтобы получить подарок",
    		"GIFTS_MAIN_PRODUCT_DETAIL_HIDE_BLOCK_TITLE" => "N",
    		"GIFTS_MAIN_PRODUCT_DETAIL_PAGE_ELEMENT_COUNT" => "4",
    		"GIFTS_MESS_BTN_BUY" => "Выбрать",
    		"GIFTS_SECTION_LIST_BLOCK_TITLE" => "Подарки к товарам этого раздела",
    		"GIFTS_SECTION_LIST_HIDE_BLOCK_TITLE" => "N",
    		"GIFTS_SECTION_LIST_PAGE_ELEMENT_COUNT" => "4",
    		"GIFTS_SECTION_LIST_TEXT_LABEL_GIFT" => "Подарок",
    		"GIFTS_SHOW_DISCOUNT_PERCENT" => "Y",
    		"GIFTS_SHOW_IMAGE" => "Y",
    		"GIFTS_SHOW_NAME" => "Y",
    		"GIFTS_SHOW_OLD_PRICE" => "Y",
    		"HIDE_NOT_AVAILABLE" => "N",
    		"HIDE_NOT_AVAILABLE_OFFERS" => "Y",
    		"IBLOCK_ID" => "4",
    		"IBLOCK_TYPE" => "catalog",
    		"INCLUDE_SUBSECTIONS" => "N",
    		"INSTANT_RELOAD" => "Y",
    		"LABEL_PROP" => array(
    		),
    		"LABEL_PROP_MOBILE" => "",
    		"LABEL_PROP_POSITION" => "top-left",
    		"LAZY_LOAD" => "N",
    		"LINE_ELEMENT_COUNT" => "3",
    		"LINK_ELEMENTS_URL" => "link.php?PARENT_ELEMENT_ID=#ELEMENT_ID#",
    		"LINK_IBLOCK_ID" => "",
    		"LINK_IBLOCK_TYPE" => "",
    		"LINK_PROPERTY_SID" => "",
    		"LIST_BROWSER_TITLE" => "-",
    		"LIST_ENLARGE_PRODUCT" => "STRICT",
    		"LIST_META_DESCRIPTION" => "-",
    		"LIST_META_KEYWORDS" => "-",
    		"LIST_PRODUCT_BLOCKS_ORDER" => "price,props,sku,quantityLimit,quantity,buttons",
    		"LIST_PRODUCT_ROW_VARIANTS" => "[{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false}]",
    		"LIST_SHOW_SLIDER" => "N",
    		"LIST_SLIDER_INTERVAL" => "3000",
    		"LIST_SLIDER_PROGRESS" => "N",
    		"LOAD_ON_SCROLL" => "Y",
    		"MESSAGE_404" => "",
    		"MESS_BTN_ADD_TO_BASKET" => "В корзину",
    		"MESS_BTN_BUY" => "Купить",
    		"MESS_BTN_COMPARE" => "Сравнение",
    		"MESS_BTN_DETAIL" => "Подробнее",
    		"MESS_BTN_SUBSCRIBE" => "Подписаться",
    		"MESS_COMMENTS_TAB" => "Комментарии",
    		"MESS_DESCRIPTION_TAB" => "Описание",
    		"MESS_NOT_AVAILABLE" => "",
    		"MESS_PRICE_RANGES_TITLE" => "Цены",
    		"MESS_PROPERTIES_TAB" => "Характеристики",
    		"PAGER_BASE_LINK" => "",
    		"PAGER_BASE_LINK_ENABLE" => "Y",
    		"PAGER_DESC_NUMBERING" => "Y",
    		"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
    		"PAGER_PARAMS_NAME" => "arrPager",
    		"PAGER_SHOW_ALL" => "N",
    		"PAGER_SHOW_ALWAYS" => "Y",
    		"PAGER_TEMPLATE" => "bootstrap_v4",
    		"PAGER_TITLE" => "Товары",
    		"PAGE_ELEMENT_COUNT" => "30",
    		"PARTIAL_PRODUCT_PROPERTIES" => "N",
    		"PRICE_CODE" => array(
    		),
    		"PRICE_VAT_INCLUDE" => "N",
    		"PRICE_VAT_SHOW_VALUE" => "N",
    		"PRODUCT_ID_VARIABLE" => "id",
    		"PRODUCT_PROPS_VARIABLE" => "prop",
    		"PRODUCT_QUANTITY_VARIABLE" => "quantity",
    		"PRODUCT_SUBSCRIPTION" => "N",
    		"SEARCH_CHECK_DATES" => "Y",
    		"SEARCH_NO_WORD_LOGIC" => "Y",
    		"SEARCH_PAGE_RESULT_COUNT" => "50",
    		"SEARCH_RESTART" => "N",
    		"SEARCH_USE_LANGUAGE_GUESS" => "Y",
    		"SECTIONS_HIDE_SECTION_NAME" => "N",
    		"SECTIONS_SHOW_PARENT_NAME" => "N",
    		"SECTIONS_VIEW_MODE" => "TILE",
    		"SECTION_ADD_TO_BASKET_ACTION" => "ADD",
    		"SECTION_BACKGROUND_IMAGE" => "-",
    		"SECTION_COUNT_ELEMENTS" => "N",
    		"SECTION_ID_VARIABLE" => "SECTION_ID",
    		"SECTION_TOP_DEPTH" => "2",
    		"SEF_FOLDER" => "/zhalyuzi/",
    		"SEF_MODE" => "Y",
    		"SET_LAST_MODIFIED" => "N",
    		"SET_STATUS_404" => "N",
    		"SET_TITLE" => "Y",
    		"SHOW_404" => "N",
    		"SHOW_DEACTIVATED" => "N",
    		"SHOW_DISCOUNT_PERCENT" => "N",
    		"SHOW_MAX_QUANTITY" => "N",
    		"SHOW_OLD_PRICE" => "N",
    		"SHOW_PRICE_COUNT" => "0",
    		"SHOW_TOP_ELEMENTS" => "N",
    		"SIDEBAR_DETAIL_POSITION" => "left",
    		"SIDEBAR_DETAIL_SHOW" => "N",
    		"SIDEBAR_PATH" => "",
    		"SIDEBAR_SECTION_POSITION" => "left",
    		"SIDEBAR_SECTION_SHOW" => "Y",
    		"TEMPLATE_THEME" => "black",
    		"TOP_ADD_TO_BASKET_ACTION" => "ADD",
    		"TOP_ELEMENT_COUNT" => "12",
    		"TOP_ELEMENT_SORT_FIELD" => "sort",
    		"TOP_ELEMENT_SORT_FIELD2" => "id",
    		"TOP_ELEMENT_SORT_ORDER" => "asc",
    		"TOP_ELEMENT_SORT_ORDER2" => "desc",
    		"TOP_ENLARGE_PRODUCT" => "STRICT",
    		"TOP_LINE_ELEMENT_COUNT" => "3",
    		"TOP_PRODUCT_BLOCKS_ORDER" => "price,props,sku,quantityLimit,quantity,buttons",
    		"TOP_PRODUCT_ROW_VARIANTS" => "[{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'2','BIG_DATA':false},{'VARIANT':'0','BIG_DATA':false},{'VARIANT':'0','BIG_DATA':false},{'VARIANT':'0','BIG_DATA':false}]",
    		"TOP_SHOW_SLIDER" => "N",
    		"TOP_SLIDER_INTERVAL" => "3000",
    		"TOP_SLIDER_PROGRESS" => "N",
    		"TOP_VIEW_MODE" => "SECTION",
    		"USER_CONSENT" => "N",
    		"USER_CONSENT_ID" => "0",
    		"USER_CONSENT_IS_CHECKED" => "Y",
    		"USER_CONSENT_IS_LOADED" => "N",
    		"USE_ALSO_BUY" => "N",
    		"USE_BIG_DATA" => "N",
    		"USE_COMMON_SETTINGS_BASKET_POPUP" => "N",
    		"USE_COMPARE" => "N",
    		"USE_ELEMENT_COUNTER" => "Y",
    		"USE_ENHANCED_ECOMMERCE" => "N",
    		"USE_FILTER" => "Y",
    		"USE_GIFTS_DETAIL" => "N",
    		"USE_GIFTS_MAIN_PR_SECTION_LIST" => "N",
    		"USE_GIFTS_SECTION" => "N",
    		"USE_MAIN_ELEMENT_SECTION" => "Y",
    		"USE_PRICE_COUNT" => "N",
    		"USE_PRODUCT_QUANTITY" => "N",
    		"USE_SALE_BESTSELLERS" => "N",
    		"USE_STORE" => "N",
    		"SEF_URL_TEMPLATES" => array(
    			"sections" => "",
    			"section" => "#SECTION_CODE#/",
    			"element" => "#SECTION_CODE#/#ELEMENT_CODE#/",
    			"compare" => "compare.php?action=#ACTION_CODE#",
    			"smart_filter" => "#SECTION_CODE#/filter/#SMART_FILTER_PATH#/apply/",
    		),
    		"VARIABLE_ALIASES" => array(
    			"compare" => array(
    				"ACTION_CODE" => "action",
    			),
    		)
    	),
    	false
    );?>
    
    <?if($APPLICATION->GetCurDir() == '/zhalyuzi/'){?>
        <?$APPLICATION->IncludeComponent(
            "bitrix:news.detail",
            "",
            Array(
    //Вырезал иначе не удавалось отправить комментарий
              )
        );?>
    <?}?>
        <?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>