diff --git a/common/modules/product/models/Product.php b/common/modules/product/models/Product.php index c38d6e2..9fb1c7d 100755 --- a/common/modules/product/models/Product.php +++ b/common/modules/product/models/Product.php @@ -4,6 +4,7 @@ namespace common\modules\product\models; use common\behaviors\Slug; use common\models\ProductToRating; +use common\models\Share; use common\modules\comment\models\Comment; use common\modules\product\behaviors\FilterBehavior; use common\modules\rubrication\models\TaxGroup; @@ -331,6 +332,11 @@ class Product extends \yii\db\ActiveRecord ProductImage::deleteAll(['product_id' => $this->product_id]); ProductCategory::deleteAll(['product_id' => $this->product_id]); ProductVariant::deleteAll(['product_id' => $this->product_id]); + ProductOption::deleteAll(['product_id' => $this->product_id]); + ProductVariantOption::deleteAll(['product_id' => $this->product_id]); + ProductStock::deleteAll(['product_id' => $this->product_id]); + Share::deleteAll(['product_id' => $this->product_id]); + return true; } public function imagesUpload() diff --git a/composer_2.phar b/composer_2.phar deleted file mode 100755 index 946d4d1..0000000 Binary files a/composer_2.phar and /dev/null differ diff --git a/console/migrations/m160722_150612_remove_option_product_variant_id.php b/console/migrations/m160722_150612_remove_option_product_variant_id.php new file mode 100644 index 0000000..213a477 --- /dev/null +++ b/console/migrations/m160722_150612_remove_option_product_variant_id.php @@ -0,0 +1,27 @@ +dropForeignKey('option_product_variant_id', '{{%product_variant_option}}'); + } + + public function down() + { + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160725_154511_remove_product_option_product_fkey.php b/console/migrations/m160725_154511_remove_product_option_product_fkey.php new file mode 100644 index 0000000..c59c6bb --- /dev/null +++ b/console/migrations/m160725_154511_remove_product_option_product_fkey.php @@ -0,0 +1,27 @@ +dropForeignKey('product_option_product_fkey', '{{%product_option}}'); + } + + public function down() + { + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php b/console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php new file mode 100644 index 0000000..40eb68f --- /dev/null +++ b/console/migrations/m160725_155127_remove_product_stock_product_variant_id_fkey.php @@ -0,0 +1,27 @@ +dropForeignKey('product_stock_product_variant_id_fkey', '{{%product_stock}}'); + } + + public function down() + { + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} diff --git a/frontend/web/images/no_photo.png b/frontend/web/images/no_photo.png deleted file mode 100755 index fc71420..0000000 Binary files a/frontend/web/images/no_photo.png and /dev/null differ -- libgit2 0.21.4