Commit 6fa4aa31c8ac38e0581ad47ba8ba7e4d4c6089fd
1 parent
0864c8f1
-Sort ready
Showing
12 changed files
with
2 additions
and
2 deletions
Show diff stats
console/migrations/m161104_094427_filter_cache.php
100644 → 100755
frontend/models/ProductFrontendSearch.php
@@ -102,8 +102,8 @@ class ProductFrontendSearch extends Product { | @@ -102,8 +102,8 @@ class ProductFrontendSearch extends Product { | ||
102 | $query->select(['product.*']); | 102 | $query->select(['product.*']); |
103 | $query->joinWith(['enabledVariants','brand','options', 'category']); | 103 | $query->joinWith(['enabledVariants','brand','options', 'category']); |
104 | 104 | ||
105 | - $query->groupBy(['product.product_id', 'product_variant.price']); | ||
106 | - | 105 | + $query->groupBy(['product.product_id', 'product_variant.price', 'product_variant.stock']); |
106 | + $query->orderBy(['product_variant.stock' => SORT_DESC]); | ||
107 | ProductHelper::_setQueryParams($query, $params); | 107 | ProductHelper::_setQueryParams($query, $params); |
108 | if($in_stock){ | 108 | if($in_stock){ |
109 | $query->andWhere(['!=', ProductVariant::tableName() .'.status', 1]); | 109 | $query->andWhere(['!=', ProductVariant::tableName() .'.status', 1]); |
frontend/web/css/ion.rangeSlider.skinHTML5.css
100644 → 100755