aspro:tabs.next

В файле component.php вносим следующие изменения:

Code Copy code Code copied!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//После кода:
$arShowProp = CNextCache::CIBlockPropertyEnum_GetList(Array("sort" => "asc", "id" => "desc", "CACHE" => array("TAG" => CNextCache::GetPropertyCacheTag($arParams["TABS_CODE"]))), Array("ACTIVE" => "Y", "IBLOCK_ID" => $arParams["IBLOCK_ID"], "CODE" => $arParams["TABS_CODE"]));

//Добавляем код
//Строка 71:
$rsProp = CIBlockPropertyEnum::GetList(
  Array("sort" => "asc", "id" => "desc"),
  Array("ACTIVE" => "Y", "IBLOCK_ID" => $arParams["IBLOCK_ID"], "CODE" => $arParams["TABS_CODE"])
);

$arShowPropOrig = [];

while($arProp=$rsProp->Fetch()){
  if($arProp['VALUE'])
    $arShowPropOrig[$arProp["EXTERNAL_ID"]] = $arProp["VALUE"];
}


 //Также меняем код
 //Строка 126:

 foreach($arShowProp as $key => $prop)
{
   $arItems = array();
   //edit_by_Fantych: 21.08.2023 
   $arFilterProp = array("PROPERTY_".$arParams["TABS_CODE"]."_VALUE" => array($arShowPropOrig[$key]));

   $arItems = CNextCache::CIBLockElement_GetList(array('CACHE' => array("MULTI" => "N", "TAG" => CNextCache::GetIBlockCacheTag($arParams["IBLOCK_ID"]))), array_merge($arFilter, $arrFilter, $arFilterStores, $arFilterProp), false, array("nTopCount" => 1), array("ID"));
   if($arItems)
   {
      $arTabs[$key] = array(
         "CODE" => $key,
         "TITLE" => $prop,
         "FILTER" => array_merge($arFilter, $arrFilter, $arFilterStores, $arFilterProp)
      );
      $arResult["SHOW_SLIDER_PROP"] = true;
   }
}

Количество показов: 302
Дата изменения: 10.09.2023 07:33:54