Commit 4775a528ccc306a7ad237d2ffe9a54db5c1aeb67
1 parent
367a13ab
site map
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
models/Product.php
| ... | ... | @@ -594,7 +594,9 @@ |
| 594 | 594 | public function afterSave($insert, $changedAttributes) |
| 595 | 595 | { |
| 596 | 596 | parent::afterSave($insert, $changedAttributes); |
| 597 | - | |
| 597 | + | |
| 598 | + Catalog::addRecord($this); | |
| 599 | + | |
| 598 | 600 | if (!empty( $this->categories )) { |
| 599 | 601 | $categories = Category::findAll($this->categories); |
| 600 | 602 | $this->unlinkAll('categories', true); |
| ... | ... | @@ -669,7 +671,7 @@ |
| 669 | 671 | public function beforeSave($insert) |
| 670 | 672 | { |
| 671 | 673 | if (parent::beforeSave($insert)) { |
| 672 | - Catalog::addRecord($this); | |
| 674 | + | |
| 673 | 675 | return true; |
| 674 | 676 | } else { |
| 675 | 677 | return false; | ... | ... |
models/ProductVariant.php
| ... | ... | @@ -445,6 +445,9 @@ |
| 445 | 445 | public function afterSave($insert, $changedAttributes) |
| 446 | 446 | { |
| 447 | 447 | parent::afterSave($insert, $changedAttributes); |
| 448 | + | |
| 449 | + Catalog::addRecord($this->product); | |
| 450 | + | |
| 448 | 451 | if (!empty($this->options)) { |
| 449 | 452 | $options = TaxOption::findAll($this->options); |
| 450 | 453 | $this->unlinkAll('options', true); |
| ... | ... | @@ -497,7 +500,7 @@ |
| 497 | 500 | public function beforeSave($insert) |
| 498 | 501 | { |
| 499 | 502 | if (parent::beforeSave($insert)) { |
| 500 | - Catalog::addRecord($this->product); | |
| 503 | + | |
| 501 | 504 | return true; |
| 502 | 505 | } else { |
| 503 | 506 | return false; | ... | ... |