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 | 67 | [['name'], 'string', 'max' => 150], |
68 | 68 | [['alias'], 'string', 'max' => 250], |
69 | 69 | [['categories', 'variants', 'options'], 'safe'], |
70 | - [['imagesUpload'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg, gif'], | |
70 | +// [['imagesUpload'], 'file', 'skipOnEmpty' => false, 'extensions' => 'png, jpg, gif'], | |
71 | 71 | [['description', 'video'], 'safe'], |
72 | 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 | 183 | { |
184 | 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 | 190 | $todel = []; |
191 | 191 | foreach ($this->variants ? : [] as $_variant) { | ... | ... |