Commit c89c8efd1586dc61b4ddb41efbd95e60f049f2cd
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 | 71 | 'pageSize' => 15, |
| 72 | 72 | ], |
| 73 | 73 | 'sort' => [ |
| 74 | - 'attributes' => [ | |
| 74 | + 'attributes' => [ | |
| 75 | 75 | 'name' => [ |
| 76 | 76 | 'asc' => [ 'name' => SORT_ASC ], |
| 77 | 77 | 'desc' => [ 'name' => SORT_DESC ], |
| ... | ... | @@ -85,10 +85,6 @@ |
| 85 | 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 | 118 | $query->orderBy( |
| 123 | 119 | [ |
| 124 | 120 | 'brand.sort' => SORT_ASC, |
| 121 | + 'product_variant.price' => SORT_ASC, | |
| 125 | 122 | 'product_variant.stock' => SORT_DESC, |
| 126 | 123 | ] |
| 127 | 124 | ); | ... | ... |