Commit 96c82e6447f5038a166a457a0e6b9e071e36b50c
1 parent
8effd263
product admin price
Showing
5 changed files
with
20 additions
and
0 deletions
Show diff stats
backend/views/product/_form.php
common/messages/ru/app.php
... | ... | @@ -391,6 +391,7 @@ return [ |
391 | 391 | 'Номінальна потужність мережевого інвертора'=>'Номінальна потужність мережевого інвертора', |
392 | 392 | 'Встановлена потужність фотоелектричних модулів'=>'Встановлена потужність фотоелектричних модулів', |
393 | 393 | 'Вартість системи "під ключ"'=>'Стоимость системы "под ключ"', |
394 | + 'Price'=>'Цена', | |
394 | 395 | |
395 | 396 | |
396 | 397 | ... | ... |
common/messages/ua/app.php
common/models/Product.php
... | ... | @@ -4,6 +4,7 @@ namespace common\models; |
4 | 4 | |
5 | 5 | use artbox\core\behaviors\LanguageBehavior; |
6 | 6 | use artbox\core\models\Image; |
7 | +use Yii; | |
7 | 8 | use yii\db\ActiveRecord; |
8 | 9 | |
9 | 10 | class Product extends ActiveRecord |
... | ... | @@ -43,6 +44,7 @@ class Product extends ActiveRecord |
43 | 44 | [ |
44 | 45 | [ |
45 | 46 | 'sku', |
47 | + 'price', | |
46 | 48 | ], |
47 | 49 | 'string', |
48 | 50 | 'max' => 255, |
... | ... | @@ -63,7 +65,20 @@ class Product extends ActiveRecord |
63 | 65 | ], |
64 | 66 | ]; |
65 | 67 | } |
68 | + /** | |
69 | + * @inheritdoc | |
70 | + */ | |
71 | + public function attributeLabels() | |
72 | + { | |
73 | + return [ | |
74 | + 'id' => Yii::t('core', 'ID'), | |
75 | + 'status' => Yii::t('core', 'Status'), | |
76 | + 'sort' => Yii::t('core', 'Sort'), | |
77 | + 'price' => Yii::t('app', 'Price'), | |
78 | +// 'image_mini_id' => Yii::t('core', 'Image Mini'), | |
66 | 79 | |
80 | + ]; | |
81 | + } | |
67 | 82 | /** |
68 | 83 | * @return \yii\db\ActiveQuery |
69 | 84 | */ | ... | ... |
console/migrations/m220412_144550_create_product_table.php
... | ... | @@ -17,6 +17,7 @@ class m220412_144550_create_product_table extends Migration |
17 | 17 | 'status' => $this->boolean(), |
18 | 18 | 'sort' => $this->smallInteger(), |
19 | 19 | 'sku' =>$this->string(255), |
20 | + 'price' =>$this->string(255), | |
20 | 21 | 'image_id' => $this->integer(), |
21 | 22 | ]); |
22 | 23 | $this->addForeignKey( | ... | ... |