// set offer type & smartfilter view
$typeTmpSKU = $viewTmpFilter = 0;
if($section['UF_OFFERS_TYPE']){
$typeTmpSKU = $section['UF_OFFERS_TYPE'];
}
if($section['UF_FILTER_VIEW']){
$viewTmpFilter = $section['UF_FILTER_VIEW'];
}
if(!$typeTmpSKU || !$viewTmpFilter){
if($section['DEPTH_LEVEL'] > 1){
$sectionParent = CNextCache::CIBlockSection_GetList(array('CACHE' => array("MULTI" =>"N", "TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]))), array('GLOBAL_ACTIVE' => 'Y', "ID" => $section["IBLOCK_SECTION_ID"], "IBLOCK_ID" => $arParams["IBLOCK_ID"]), false, array("ID", "IBLOCK_ID", "NAME", "UF_OFFERS_TYPE", 'UF_FILTER_VIEW'));
if($sectionParent['UF_OFFERS_TYPE'] && !$typeTmpSKU){
$typeTmpSKU = $sectionParent['UF_OFFERS_TYPE'];
}
if($sectionParent['UF_FILTER_VIEW'] && !$viewTmpFilter){
$viewTmpFilter = $sectionParent['UF_FILTER_VIEW'];
}
if($section['DEPTH_LEVEL'] > 2){
if(!$typeTmpSKU || !$viewTmpFilter){
$sectionRoot = CNextCache::CIBlockSection_GetList(array('CACHE' => array("MULTI" =>"N", "TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]))), array('GLOBAL_ACTIVE' => 'Y', "<=LEFT_BORDER" => $section["LEFT_MARGIN"], ">=RIGHT_BORDER" => $section["RIGHT_MARGIN"], "DEPTH_LEVEL" => 1, "IBLOCK_ID" => $arParams["IBLOCK_ID"]), false, array("ID", "IBLOCK_ID", "NAME", "UF_OFFERS_TYPE", 'UF_FILTER_VIEW'));
if($sectionRoot['UF_OFFERS_TYPE'] && !$typeTmpSKU){
$typeTmpSKU = $sectionRoot['UF_OFFERS_TYPE'];
}
if($sectionRoot['UF_FILTER_VIEW'] && !$viewTmpFilter){
$viewTmpFilter = $sectionRoot['UF_FILTER_VIEW'];
}
}
}
}
}