fix for programs aggregations special & cargo brands list

This commit is contained in:
merelendor 2024-09-19 19:46:11 +03:00
parent 94795ea8b4
commit 2819603726
2 changed files with 3 additions and 22 deletions

View File

@ -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();
}
}

View File

@ -133,10 +133,6 @@ $this->setFrameMode(true);
/*
<section data-page="aggregation">
<?
// print "<pre>"; print_r($arResult); print "</pre>";
// 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'],