diff --git a/models/Product.php b/models/Product.php index b759931..e727ac0 100755 --- a/models/Product.php +++ b/models/Product.php @@ -380,7 +380,6 @@ public function getFullName():string { $name = ''; - $groupName = (new Query())->select(['tax_option.*','tax_option_lang.*']) ->from([ 'tax_option' ]) ->innerJoin('tax_group', 'tax_group.id = tax_option.tax_group_id') @@ -595,7 +594,7 @@ { parent::afterSave($insert, $changedAttributes); - Catalog::addRecord($this); + if (!empty( $this->categories )) { $categories = Category::findAll($this->categories); @@ -612,6 +611,7 @@ $this->link('options', $option); } } + Catalog::addRecord($this); } /** -- libgit2 0.21.4