diff --git a/local/components/evolution/programs.aggregations.brands.list/component.php b/local/components/evolution/programs.aggregations.brands.list/component.php index d401c0a..4d34ef5 100644 --- a/local/components/evolution/programs.aggregations.brands.list/component.php +++ b/local/components/evolution/programs.aggregations.brands.list/component.php @@ -33,7 +33,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true)))) { $res_filter = CIBlockElement::GetList( [ "SORT" => "ASC" ], - [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_PROGRAMS_AGGREGATION_RULES_SPECIAL, "PROPERTY_VEHICLE_TYPE" => $arParams['TYPE'], "!PROPERTY_VEHICLE_BRAND" => false, ], + [ "ACTIVE" => "Y", "IBLOCK_ID" => $arParams['RULES_IBLOCK_ID'], "PROPERTY_VEHICLE_TYPE" => $arParams['TYPE'], "!PROPERTY_VEHICLE_BRAND" => false, ], false, false, ['ID', 'NAME', 'PROPERTY_VEHICLE_BRAND'] ); while ($element_filter = $res_filter->GetNextElement()) @@ -48,17 +48,6 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true)))) $filter['ID'] = $brands_ids; } -/* $sec_res = CIBlockSection::GetList($sort, $filter, false, [], false); - while ($section = $sec_res->GetNext()) - { - if(!empty($section['PICTURE'])) - { - } - - $section['ITEMS'] = []; - $filter = array_merge($filter, [ "SECTION_ID" => $section['ID'] ]); - */ - $res = CIBlockElement::GetList($sort, $filter, false, $options); while ($element = $res->GetNextElement()) { @@ -67,12 +56,6 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true)))) $arResult['ITEMS'][] = $ar_res; } - //if(count($section['ITEMS']) > 0) - //{ -// $arResult['SECTIONS'][] = $section; - //} -// } - $this->IncludeComponentTemplate(); } } \ No newline at end of file diff --git a/local/components/evolution/programs.aggregations/templates/.default/template.php b/local/components/evolution/programs.aggregations/templates/.default/template.php index 50e7cbe..6b33b01 100644 --- a/local/components/evolution/programs.aggregations/templates/.default/template.php +++ b/local/components/evolution/programs.aggregations/templates/.default/template.php @@ -133,10 +133,6 @@ $this->setFrameMode(true); /*
"; print_r($arResult); print ""; -// die(); - $APPLICATION->IncludeComponent( "evolution:programs.aggregations.offers.list", "", @@ -360,6 +356,7 @@ elseif(isset($arResult['GROUP'])) "", [ "IBLOCK_ID" => $arParams['IBLOCK_ID_PROGRAMS_AGGREGATION_BRANDS'], + "RULES_IBLOCK_ID" => $arParams['IBLOCK_ID_RULES'], "TYPE" => $arResult['TYPE'], "TYPE_SLUG" => $arResult['TYPE_SLUG'], "TYPE_GENITIVE" => $arResult['TYPE_GENITIVE'], @@ -378,6 +375,7 @@ elseif(isset($arResult['GROUP'])) "", [ "IBLOCK_ID" => $arParams['IBLOCK_ID_PROGRAMS_AGGREGATION_BRANDS'], + "RULES_IBLOCK_ID" => $arParams['IBLOCK_ID_RULES'], "TYPE" => $arResult['TYPE'], "TYPE_SLUG" => $arResult['TYPE_SLUG'], "TYPE_GENITIVE" => $arResult['TYPE_GENITIVE'],