Commit c24bfa689001d4401077131d7bba95afd00347c2

Authored by Karnovsky A
1 parent f57bf6b7

Some fixes

common/modules/product/models/Brand.php
... ... @@ -27,12 +27,6 @@ class Brand extends \yii\db\ActiveRecord
27 27 public function behaviors()
28 28 {
29 29 return [
30   - 'slug' => [
31   - 'class' => Slug::className(),
32   - 'in_attribute' => 'name',
33   - 'out_attribute' => 'alias',
34   - 'translit' => true
35   - ],
36 30 'artboxsynonym' => [
37 31 'class' => ArtboxSynonymBehavior::className(),
38 32 'keyNameValue' => 'brand_name_id',
... ... @@ -41,7 +35,13 @@ class Brand extends \yii\db\ActiveRecord
41 35 'valueFields' => [ // postKey => DBFieldName
42 36 'name' => 'value'
43 37 ]
44   - ]
  38 + ],
  39 + 'slug' => [
  40 + 'class' => Slug::className(),
  41 + 'in_attribute' => 'name',
  42 + 'out_attribute' => 'alias',
  43 + 'translit' => true
  44 + ],
45 45 ];
46 46 }
47 47  
... ...
common/modules/product/models/ProductVariant.php
... ... @@ -34,7 +34,7 @@ class ProductVariant extends \yii\db\ActiveRecord
34 34 public function rules()
35 35 {
36 36 return [
37   - [['product_id', 'name', 'sku', 'product_unit_id'], 'required'],
  37 + [['product_id', 'sku', 'product_unit_id'], 'required'],
38 38 [['product_id', 'product_unit_id'], 'integer'],
39 39 [['price', 'price_old', 'stock'], 'number'],
40 40 [['name', 'sku'], 'string', 'max' => 255],
... ...