Commit 0fdb52edf7cecbc8cd254fdb46e829335a6db92a
1 parent
66386df5
add variantSku
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
models/ProductFrontendSearch.php
... | ... | @@ -196,6 +196,8 @@ |
196 | 196 | } else { |
197 | 197 | $query = Product::find(); |
198 | 198 | } |
199 | + | |
200 | + $query->select('MAX('.ProductVariant::tableName() . '.price) as max, MIN('.ProductVariant::tableName() . '.price) as min)'); | |
199 | 201 | $query->joinWith('variant'); |
200 | 202 | |
201 | 203 | // Price filter fix |
... | ... | @@ -209,9 +211,6 @@ |
209 | 211 | 1, |
210 | 212 | ] |
211 | 213 | ); |
212 | - return [ | |
213 | - 'min' => $query->min(ProductVariant::tableName() . '.price'), | |
214 | - 'max' => $query->max(ProductVariant::tableName() . '.price'), | |
215 | - ]; | |
214 | + return $query->all(); | |
216 | 215 | } |
217 | 216 | } |
218 | 217 | \ No newline at end of file | ... | ... |