From 00067cef4e0a26d195f729c807278073d73f21ea Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 2 Dec 2016 11:21:11 +0200 Subject: [PATCH] add variantSku --- models/ProductFrontendSearch.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/models/ProductFrontendSearch.php b/models/ProductFrontendSearch.php index 654caae..b9107d0 100755 --- a/models/ProductFrontendSearch.php +++ b/models/ProductFrontendSearch.php @@ -196,8 +196,6 @@ } else { $query = Product::find(); } - - $query->select('MAX('.ProductVariant::tableName() . '.price) as max, MIN('.ProductVariant::tableName() . '.price) as min'); $query->joinWith('variant'); // Price filter fix @@ -211,6 +209,9 @@ 1, ] ); - return $query->all(); + return [ + 'min' => $query->min(ProductVariant::tableName() . '.price'), + 'max' => $query->max(ProductVariant::tableName() . '.price'), + ]; } } \ No newline at end of file -- libgit2 0.21.4