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