diff --git a/common/modules/product/models/BrandSearch.php b/common/modules/product/models/BrandSearch.php index 2e800e0..12f9952 100755 --- a/common/modules/product/models/BrandSearch.php +++ b/common/modules/product/models/BrandSearch.php @@ -101,13 +101,13 @@ class BrandSearch extends Brand $query->innerJoin('product_variant', 'product_variant.product_id = '. Product::tableName() .'.product_id'); $query->where(['!=', 'product_variant.status', 1]); - $query->groupBy(Product::tableName() .'.product_id'); +// $query->groupBy(Product::tableName() .'.product_id'); if (!empty($category)) { $query->andWhere([ ProductCategory::tableName() .'.category_id' => $category->category_id ]); } - $query->groupBy(Brand::tableName() .'.brand_id'); +// $query->groupBy(Brand::tableName() .'.brand_id'); return $query; } diff --git a/frontend/models/ProductFrontendSearch.php b/frontend/models/ProductFrontendSearch.php index 46a5f6f..94d3bd2 100755 --- a/frontend/models/ProductFrontendSearch.php +++ b/frontend/models/ProductFrontendSearch.php @@ -102,7 +102,7 @@ class ProductFrontendSearch extends Product { $query->select(['product.*']); $query->joinWith(['enabledVariants','brand','options', 'category']); - $query->groupBy(['product.product_id', 'product_variant.price', 'product_variant.stock']); +// $query->groupBy(['product.product_id', 'product_variant.price', 'product_variant.stock']); $query->orderBy(['product_variant.stock' => SORT_DESC]); ProductHelper::_setQueryParams($query, $params); if($in_stock){ diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index 3971642..976139e 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -12,6 +12,7 @@ use yii\bootstrap\ActiveForm; use yii\bootstrap\Html; use yii\helpers\Url; + use yii\helpers\VarDumper; use yii\web\View; use yii\widgets\MaskedInput; use frontend\assets\FlipclockAsset; @@ -492,14 +493,42 @@