This commit is contained in:
Bellord
2026-10-01 16:18:32 +03:00
parent 4d3eda33fb
commit aac75b3752
2 changed files with 20 additions and 3 deletions
+7 -2
View File
@@ -57,14 +57,19 @@ class ElementList extends OriginElementList implements IElementList
$iblock = $this->storage['CATALOGS'][$this->arParams['IBLOCK_ID']];
/** inject */
$this->globalFilter = \Ixrs\Catalog\Support\ElementList::getGlobalFilter($this->arParams['IBLOCK_ID'], $this->globalFilter);
$offersFilter = [];
$this->globalFilter = \Ixrs\Catalog\Support\ElementList::getGlobalFilter($this->arParams['IBLOCK_ID'], $this->globalFilter, $offersFilter);
$this->storage['SUB_FILTER_2'] = $offersFilter;
/** inject end */
$offersFilterExists = !empty($this->globalFilter['OFFERS']) && is_array($this->globalFilter['OFFERS']);
$offersFilterExists = !!$offersFilter;
if ($offersFilterExists)
{
$this->storage['SUB_FILTER'] = array_merge($this->globalFilter['OFFERS'], $catalogFilter);
//$this->storage['SUB_FILTER'] = array_merge($this->globalFilter['OFFERS'], $catalogFilter);
$this->storage['SUB_FILTER'] = array_merge($offersFilter, $catalogFilter);
$this->storage['SUB_FILTER']['IBLOCK_ID'] = $iblock['IBLOCK_ID'];
$this->storage['SUB_FILTER']['ACTIVE_DATE'] = 'Y';
$this->storage['SUB_FILTER']['ACTIVE'] = 'Y';