Commit 7c28815bc4f5d4a6f8ae8c387840373ec7e4d00f
Merge remote-tracking branch 'origin/master'
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
common/modules/product/models/Product.php
| @@ -67,7 +67,7 @@ class Product extends \yii\db\ActiveRecord | @@ -67,7 +67,7 @@ class Product extends \yii\db\ActiveRecord | ||
| 67 | [['name'], 'string', 'max' => 150], | 67 | [['name'], 'string', 'max' => 150], |
| 68 | [['alias'], 'string', 'max' => 250], | 68 | [['alias'], 'string', 'max' => 250], |
| 69 | [['categories', 'variants', 'options'], 'safe'], | 69 | [['categories', 'variants', 'options'], 'safe'], |
| 70 | - [['imagesUpload'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg, gif'], | 70 | +// [['imagesUpload'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg, gif'], |
| 71 | [['description', 'video'], 'safe'], | 71 | [['description', 'video'], 'safe'], |
| 72 | // [['product_id'], 'exist', 'skipOnError' => true, 'targetClass' => Product::className(), 'targetAttribute' => ['product_id' => 'product_id']], | 72 | // [['product_id'], 'exist', 'skipOnError' => true, 'targetClass' => Product::className(), 'targetAttribute' => ['product_id' => 'product_id']], |
| 73 | ]; | 73 | ]; |
| @@ -183,9 +183,9 @@ class Product extends \yii\db\ActiveRecord | @@ -183,9 +183,9 @@ class Product extends \yii\db\ActiveRecord | ||
| 183 | { | 183 | { |
| 184 | parent::afterSave($insert, $changedAttributes); | 184 | parent::afterSave($insert, $changedAttributes); |
| 185 | 185 | ||
| 186 | - foreach($this->imagesUpload as $image) { | ||
| 187 | - $image->saveAs('/images/items/' . $image->baseName .'_'. uniqid() . '.' . $image->extension); | ||
| 188 | - } | 186 | +// foreach($this->imagesUpload as $image) { |
| 187 | +// $image->saveAs('/images/items/' . $image->baseName .'_'. uniqid() . '.' . $image->extension); | ||
| 188 | +// } | ||
| 189 | 189 | ||
| 190 | $todel = []; | 190 | $todel = []; |
| 191 | foreach ($this->variants ? : [] as $_variant) { | 191 | foreach ($this->variants ? : [] as $_variant) { |