Commit c533dd50084fe3b15b03e7832588812fd537f2af

Authored by Alexey Boroda
2 parents e0906f08 61453ef0

Merge remote-tracking branch 'origin/master'

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
... ... @@ -47,7 +47,6 @@
47 47 [
48 48 [
49 49 'title',
50   - 'text',
51 50 ],
52 51 'required',
53 52 ],
... ...
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 ]
... ...