Commit 00067cef4e0a26d195f729c807278073d73f21ea

Authored by Administrator
1 parent 120374e6

add variantSku

Showing 1 changed file with 4 additions and 3 deletions   Show diff stats
models/ProductFrontendSearch.php
... ... @@ -196,8 +196,6 @@
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');
201 199 $query->joinWith('variant');
202 200  
203 201 // Price filter fix
... ... @@ -211,6 +209,9 @@
211 209 1,
212 210 ]
213 211 );
214   - return $query->all();
  212 + return [
  213 + 'min' => $query->min(ProductVariant::tableName() . '.price'),
  214 + 'max' => $query->max(ProductVariant::tableName() . '.price'),
  215 + ];
215 216 }
216 217 }
217 218 \ No newline at end of file
... ...