From 57e21fcbc2f1923ba4ec06a2c2db5e5cfd444ac8 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 15 Dec 2016 14:22:24 +0200 Subject: [PATCH] site map --- models/Product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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