Commit 9db1f47f705cd510a5c24bba1ca93cdbd7fb578e
1 parent
b523105f
Add category.name short property
Showing
2 changed files
with
4 additions
and
6 deletions
Show diff stats
common/modules/product/models/Category.php
... | ... | @@ -161,9 +161,7 @@ class Category extends \yii\db\ActiveRecord |
161 | 161 | return $this->hasOne(CategoryName::className(), ['category_name_id' => 'category_name_id']); |
162 | 162 | } |
163 | 163 | |
164 | -// public function getName() { | |
165 | -//// return $this->getCategoryName(); | |
166 | -// $value = $this->getCategoryName()->one(); | |
167 | -// return empty($value) ? $this->_getValue('name') : $value->value; | |
168 | -// } | |
164 | + public function getName() { | |
165 | + return empty($this->categoryName) ? null : $this->categoryName->value; | |
166 | + } | |
169 | 167 | } | ... | ... |
common/modules/rubrication/views/tax-group/_form.php
... | ... | @@ -22,7 +22,7 @@ use common\components\artboxtree\ArtboxTreeHelper; |
22 | 22 | <?= $form->field($model, 'description')->textarea(['rows' => 6]) ?> |
23 | 23 | |
24 | 24 | <?= $form->field($model, 'module')->dropDownList(RubricationHelper::OptionTypes(), [ |
25 | - 'promtp' => Yii::t('rubrication', 'Select module'), | |
25 | + 'prompt' => Yii::t('rubrication', 'Select module'), | |
26 | 26 | ]) ?> |
27 | 27 | |
28 | 28 | <?= $form->field($model, 'group_to_category')->dropDownList( | ... | ... |