Commit c24bfa689001d4401077131d7bba95afd00347c2
1 parent
f57bf6b7
Some fixes
Showing
2 changed files
with
8 additions
and
8 deletions
Show diff stats
common/modules/product/models/Brand.php
@@ -27,12 +27,6 @@ class Brand extends \yii\db\ActiveRecord | @@ -27,12 +27,6 @@ class Brand extends \yii\db\ActiveRecord | ||
27 | public function behaviors() | 27 | public function behaviors() |
28 | { | 28 | { |
29 | return [ | 29 | return [ |
30 | - 'slug' => [ | ||
31 | - 'class' => Slug::className(), | ||
32 | - 'in_attribute' => 'name', | ||
33 | - 'out_attribute' => 'alias', | ||
34 | - 'translit' => true | ||
35 | - ], | ||
36 | 'artboxsynonym' => [ | 30 | 'artboxsynonym' => [ |
37 | 'class' => ArtboxSynonymBehavior::className(), | 31 | 'class' => ArtboxSynonymBehavior::className(), |
38 | 'keyNameValue' => 'brand_name_id', | 32 | 'keyNameValue' => 'brand_name_id', |
@@ -41,7 +35,13 @@ class Brand extends \yii\db\ActiveRecord | @@ -41,7 +35,13 @@ class Brand extends \yii\db\ActiveRecord | ||
41 | 'valueFields' => [ // postKey => DBFieldName | 35 | 'valueFields' => [ // postKey => DBFieldName |
42 | 'name' => 'value' | 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,7 +34,7 @@ class ProductVariant extends \yii\db\ActiveRecord | ||
34 | public function rules() | 34 | public function rules() |
35 | { | 35 | { |
36 | return [ | 36 | return [ |
37 | - [['product_id', 'name', 'sku', 'product_unit_id'], 'required'], | 37 | + [['product_id', 'sku', 'product_unit_id'], 'required'], |
38 | [['product_id', 'product_unit_id'], 'integer'], | 38 | [['product_id', 'product_unit_id'], 'integer'], |
39 | [['price', 'price_old', 'stock'], 'number'], | 39 | [['price', 'price_old', 'stock'], 'number'], |
40 | [['name', 'sku'], 'string', 'max' => 255], | 40 | [['name', 'sku'], 'string', 'max' => 255], |