Commit ad2227a5033d633855410138ecee0632f57f32ee
1 parent
4f1a92bb
site map
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
helpers/CatalogFilterHelper.php
| @@ -320,14 +320,13 @@ class CatalogFilterHelper extends Object | @@ -320,14 +320,13 @@ class CatalogFilterHelper extends Object | ||
| 320 | */ | 320 | */ |
| 321 | private static function filterPrices(array $params, array &$filters) | 321 | private static function filterPrices(array $params, array &$filters) |
| 322 | { | 322 | { |
| 323 | - $filterP = []; | 323 | + |
| 324 | if (!empty( $params[ 'min' ] ) && $params[ 'min' ] > 0) { | 324 | if (!empty( $params[ 'min' ] ) && $params[ 'min' ] > 0) { |
| 325 | - $filterP['nested']['query']['bool']['filter'][]['range']['price']['gte'] = $params[ 'min' ]; | 325 | + $filters['bool']['filter'][]['range']['price']['gte'] = $params[ 'min' ]; |
| 326 | } | 326 | } |
| 327 | if (!empty( $params[ 'max' ] ) && $params[ 'max' ] > 0) { | 327 | if (!empty( $params[ 'max' ] ) && $params[ 'max' ] > 0) { |
| 328 | - $filterP['nested']['query']['bool']['filter'][]['range']['price']['lte'] = $params[ 'max' ]; | 328 | + $filters['bool']['filter'][]['range']['price']['lte'] = $params[ 'max' ]; |
| 329 | } | 329 | } |
| 330 | - $filters['bool']['must'][] = $filterP; | ||
| 331 | 330 | ||
| 332 | } | 331 | } |
| 333 | 332 |