Commit a4c312f48b93c778a5f70367368c31da7f803650

Authored by Administrator
1 parent ee3bf1ad

20.07.16

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
common/modules/product/models/Category.php
@@ -221,7 +221,7 @@ class Category extends \yii\db\ActiveRecord @@ -221,7 +221,7 @@ class Category extends \yii\db\ActiveRecord
221 $product->delete(); 221 $product->delete();
222 } 222 }
223 } 223 }
224 - $this->unlinkAll(ProductCategory::className()); 224 + ProductCategory::deleteAll(['category_id' => $this->category_id]);
225 CategoryName::deleteAll(['category_id' => $this->category_id]); 225 CategoryName::deleteAll(['category_id' => $this->category_id]);
226 return true; 226 return true;
227 } 227 }