diff --git a/helpers/CatalogFilterHelper.php b/helpers/CatalogFilterHelper.php index 2e2104f..1db2b0e 100755 --- a/helpers/CatalogFilterHelper.php +++ b/helpers/CatalogFilterHelper.php @@ -167,6 +167,23 @@ class CatalogFilterHelper extends Object public static function setQueryParams(array $params, $categoryId, $langId,$in_stock=true) { + if (!empty( $params[ 'special' ] )) { + + + + if (in_array('new', $params[ 'special' ])) { + $reform[ 'special' ][ 'is_new' ] = true; + } + if (in_array('top', $params[ 'special' ])) { + $reform[ 'special' ][ 'is_top' ] = true; + } + if (in_array('promo', $params[ 'special' ])) { + $reform[ 'special' ][ 'is_discount' ] = true; + } + + $params[ 'special' ] = $reform[ 'special' ]; + } + $last_query = null; $productVariantOptions = self::getProductVariantOptions($categoryId,$langId); $filters = []; @@ -275,9 +292,7 @@ class CatalogFilterHelper extends Object */ foreach ($params as $key => $param) { - $filters['bool']['must'][]['term'][$key] = $param; - } } -- libgit2 0.21.4