From c89c8efd1586dc61b4ddb41efbd95e60f049f2cd Mon Sep 17 00:00:00 2001 From: Yarik Date: Fri, 23 Jun 2017 16:05:23 +0300 Subject: [PATCH] Sort asc --- frontend/models/ProductFrontendSearch.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/models/ProductFrontendSearch.php b/frontend/models/ProductFrontendSearch.php index 54ac210..e4d7727 100755 --- a/frontend/models/ProductFrontendSearch.php +++ b/frontend/models/ProductFrontendSearch.php @@ -71,7 +71,7 @@ 'pageSize' => 15, ], 'sort' => [ - 'attributes' => [ + 'attributes' => [ 'name' => [ 'asc' => [ 'name' => SORT_ASC ], 'desc' => [ 'name' => SORT_DESC ], @@ -85,10 +85,6 @@ 'label' => 'по цене', ], ], - 'defaultOrder' => [ - 'brand.sort' => SORT_ASC, - 'price' => SORT_ASC, - ], ], ] ); @@ -122,6 +118,7 @@ $query->orderBy( [ 'brand.sort' => SORT_ASC, + 'product_variant.price' => SORT_ASC, 'product_variant.stock' => SORT_DESC, ] ); -- libgit2 0.21.4