Commit c89c8efd1586dc61b4ddb41efbd95e60f049f2cd

Authored by Yarik
1 parent bd3d4cdc

Sort asc

Showing 1 changed file with 2 additions and 5 deletions   Show diff stats
frontend/models/ProductFrontendSearch.php
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 'pageSize' => 15, 71 'pageSize' => 15,
72 ], 72 ],
73 'sort' => [ 73 'sort' => [
74 - 'attributes' => [ 74 + 'attributes' => [
75 'name' => [ 75 'name' => [
76 'asc' => [ 'name' => SORT_ASC ], 76 'asc' => [ 'name' => SORT_ASC ],
77 'desc' => [ 'name' => SORT_DESC ], 77 'desc' => [ 'name' => SORT_DESC ],
@@ -85,10 +85,6 @@ @@ -85,10 +85,6 @@
85 'label' => 'по цене', 85 'label' => 'по цене',
86 ], 86 ],
87 ], 87 ],
88 - 'defaultOrder' => [  
89 - 'brand.sort' => SORT_ASC,  
90 - 'price' => SORT_ASC,  
91 - ],  
92 ], 88 ],
93 ] 89 ]
94 ); 90 );
@@ -122,6 +118,7 @@ @@ -122,6 +118,7 @@
122 $query->orderBy( 118 $query->orderBy(
123 [ 119 [
124 'brand.sort' => SORT_ASC, 120 'brand.sort' => SORT_ASC,
  121 + 'product_variant.price' => SORT_ASC,
125 'product_variant.stock' => SORT_DESC, 122 'product_variant.stock' => SORT_DESC,
126 ] 123 ]
127 ); 124 );