Commit c533dd50084fe3b15b03e7832588812fd537f2af
Merge remote-tracking branch 'origin/master'
Showing
3 changed files
with
16 additions
and
4 deletions
Show diff stats
models/Delivery.php
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | * @property int $value |
16 | 16 | * @property int $sort |
17 | 17 | * @property Delivery|null $parent |
18 | + * @property Delivery[] $children | |
18 | 19 | * * From language behavior * |
19 | 20 | * @property OrderDeliveryLang $lang |
20 | 21 | * @property OrderDeliveryLang[] $langs |
... | ... | @@ -77,4 +78,10 @@ |
77 | 78 | { |
78 | 79 | return $this->hasOne(self::className(), [ 'id' => 'parent_id' ]); |
79 | 80 | } |
80 | - } | |
81 | 81 | \ No newline at end of file |
82 | + | |
83 | + public function getChildren() | |
84 | + { | |
85 | + return $this->hasMany(self::className(), [ 'parent_id' => 'id' ]); | |
86 | + } | |
87 | + } | |
88 | + | |
82 | 89 | \ No newline at end of file | ... | ... |
models/OrderDeliveryLang.php
models/ProductFrontendSearch.php
... | ... | @@ -79,11 +79,17 @@ |
79 | 79 | 'default' => SORT_DESC, |
80 | 80 | 'label' => 'имени от Я до А', |
81 | 81 | ], |
82 | - 'price' => [ | |
82 | + 'price_asc' => [ | |
83 | 83 | 'asc' => [ 'enabledVariants.price' => SORT_ASC ], |
84 | + 'desc' => [ 'enabledVariants.price' => SORT_ASC ], | |
85 | + 'default' => SORT_ASC, | |
86 | + 'label' => 'по цене по возрастанию', | |
87 | + ], | |
88 | + 'price_desc' => [ | |
89 | + 'asc' => [ 'enabledVariants.price' => SORT_DESC ], | |
84 | 90 | 'desc' => [ 'enabledVariants.price' => SORT_DESC ], |
85 | 91 | 'default' => SORT_DESC, |
86 | - 'label' => 'по цене', | |
92 | + 'label' => 'по цене по уменшению', | |
87 | 93 | ], |
88 | 94 | ], |
89 | 95 | ] | ... | ... |