change catalog promo.brands call (move PROPERTY_PROMO_VALUE to filter array, move IBLOCK_ID source to dbconn constants
This commit is contained in:
parent
778d6f2fd7
commit
6c70688a3c
@ -29,6 +29,11 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$brands_filter[ "ID" ] = $arParams['BRANDS_IDS'];
|
||||
}
|
||||
|
||||
if($arParams['BRANDS_FILTER'] !== null)
|
||||
{
|
||||
$brands_filter = array_merge($brands_filter, $arParams['BRANDS_FILTER']);
|
||||
}
|
||||
|
||||
$brands_res = CIBlockElement::GetList([ "NAME" => "ASC" ], $brands_filter, false, []);
|
||||
while ($brands_ob_element = $brands_res->GetNextElement())
|
||||
{
|
||||
|
||||
@ -143,7 +143,7 @@ if(!empty($arResult['SUBTITLE']))
|
||||
"COUNT" => 3,
|
||||
"PATH" => $arParams['PATH'],
|
||||
"QUERY_STRING" => "?BODY=".$arResult['BODY'],
|
||||
"FILTER_ARRAY" => [ "ID" => $arResult['BRANDS_IDS'], ],
|
||||
"FILTER_ARRAY" => [ "ID" => $arResult['BRANDS_IDS'], "PROPERTY_PROMO_VALUE" => "Да", ],
|
||||
"PROPERTIES_FILTER_ARRAY" => [ "PROPERTY_BODY" => $arResult['BODY'], ],
|
||||
)
|
||||
); ?>
|
||||
|
||||
@ -143,7 +143,7 @@ if(!empty($arResult['SUBTITLE']))
|
||||
"COUNT" => 3,
|
||||
"PATH" => $arParams['PATH'],
|
||||
"QUERY_STRING" => "?ENGINE_FUEL=".$arResult['ENGINE_FUEL'],
|
||||
"FILTER_ARRAY" => [ "ID" => $arResult['BRANDS_IDS'], ],
|
||||
"FILTER_ARRAY" => [ "ID" => $arResult['BRANDS_IDS'], "PROPERTY_PROMO_VALUE" => "Да", ],
|
||||
"PROPERTIES_FILTER_ARRAY" => [ "PROPERTY_ENGINE_FUEL" => $arResult['ENGINE_FUEL'], ],
|
||||
)
|
||||
); ?>
|
||||
|
||||
@ -26,7 +26,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
'BRANDS' => [],
|
||||
];
|
||||
|
||||
$brands_filter_array = [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_BRANDS, "PROPERTY_PROMO_VALUE" => "Да" ];
|
||||
$brands_filter_array = [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_BRANDS, ];
|
||||
if(isset($arParams['FILTER_ARRAY']))
|
||||
{
|
||||
$brands_filter_array = array_merge($brands_filter_array, $arParams['FILTER_ARRAY']);
|
||||
@ -38,7 +38,7 @@ if($this->StartResultCache(60*60*24, md5(var_export($_POST, true))))
|
||||
$brands_ar_res = $brands_element->GetFields();
|
||||
$brands_ar_res['ITEMS'] = [];
|
||||
|
||||
$positions_filter_array = [ "ACTIVE" => "Y", "IBLOCK_ID" => 1, "PROPERTY_BRAND" => $brands_ar_res['ID'], ];
|
||||
$positions_filter_array = [ "ACTIVE" => "Y", "IBLOCK_ID" => IBLOCK_ID_CATALOG_CARS_NEW, "PROPERTY_BRAND" => $brands_ar_res['ID'], ];
|
||||
if(isset($arParams['PROPERTIES_FILTER_ARRAY']))
|
||||
{
|
||||
$positions_filter_array = array_merge($positions_filter_array, $arParams['PROPERTIES_FILTER_ARRAY']);
|
||||
|
||||
@ -218,6 +218,7 @@ if(!empty($arResult['SUBTITLE']))
|
||||
Array(
|
||||
"COUNT" => 3,
|
||||
"PATH" => $arParams['PATH'],
|
||||
"FILTER_ARRAY" => [ "PROPERTY_PROMO_VALUE" => "Да", ],
|
||||
)
|
||||
); ?>
|
||||
<? endif; ?>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user