/?toursFilter_op[SECTION][2]=on&toursFilter_op[DATE_START]=&toursFilter_op[DATE_END]
=&toursFilter_pf[CNT_DAY]=0&set_filter=Найти+тур&set_filter=Y
/?toursFilter_op[SECTION][1]=on&toursFilter_op[DATE_START]
=&toursFilter_op[DATE_END]=&toursFilter_pf[CNT_DAY]=0&set_filter=Найти+тур&set_filter=Y
/*----- Сортировка по периоду -----*/
/*
$section = [];
foreach($_GET['toursFilter_op']['SECTION'] as $k => $s){
$section[$k] = true;
}
foreach($arResult['ITEMS'] as $k => &$arItem) {
$unset = true;
if(count($section) == 0 || isset($section[$arItem['IBLOCK_SECTION_ID']])){
$unset = false;
}
if($unset){
unset($arResult['ITEMS'][$k]);
}
}
unset($arItem);
*/
global $toursFilter;
$toursFilter = Array(
Array(
"LOGIC" => "OR",
Array("PROPERTY_SITE.CODE" => SITE_DIR),
Array("PROPERTY_SITE" => false),
)
);
// добавь этот блок
if(isset($_GET['toursFilter_op'])) {
$sectionIds = isset($_GET['toursFilter_op']['SECTION']) && $_GET['toursFilter_op']['SECTION'] ? $_GET['toursFilter_op']['SECTION'] : [];
if($sectionIds) {
foreach($sectionIds as $sectionId => $val){
$toursFilter['SECTION_ID'][] = $sectionId;
}
}
}
// ---------------
// добавь этот блок
if(isset($_GET['toursFilter_op'])) {
$bFilterSection = isset($_GET['toursFilter_op']['SECTION']) && $_GET['toursFilter_op']['SECTION'] ? true : false;
if($bFilterSection) {
foreach($_GET['toursFilter_op']['SECTION'] as $sectionId => $val){
$toursFilter['SECTION_ID'][] = $sectionId;
}
}
}
global $toursFilter;
$toursFilter = Array(
Array(
"LOGIC" => "OR",
Array("PROPERTY_SITE.CODE" => SITE_DIR),
Array("PROPERTY_SITE" => false),
)
);
$GLOBALS[$arParams['FILTER_NAME']] = Array(
Array(
"LOGIC" => "OR",
Array("PROPERTY_SITE.CODE" => SITE_DIR),
Array("PROPERTY_SITE" => false),
)
);
// добавь этот блок
if(isset($_GET['toursFilter_op'])) {
$sectionIds = isset($_GET['toursFilter_op']['SECTION']) && $_GET['toursFilter_op']['SECTION'] ? $_GET['toursFilter_op']['SECTION'] : [];
if($sectionIds) {
foreach($sectionIds as $sectionId => $val){
$GLOBALS[$arParams['FILTER_NAME']]['SECTION_ID'][] = $sectionId;
}
}
}
// ---------------