diff --git a/common/modules/product/CatalogUrlManager.php b/common/modules/product/CatalogUrlManager.php index c5aa9e6..227b497 100755 --- a/common/modules/product/CatalogUrlManager.php +++ b/common/modules/product/CatalogUrlManager.php @@ -2,12 +2,10 @@ namespace common\modules\product; -use common\modules\product\helpers\FilterHelper; -use common\modules\product\models\Brand; -use common\modules\product\models\BrandSearch; + use common\modules\product\models\CategorySearch; use common\modules\product\models\ProductSearch; -use common\modules\rubrication\models\TaxOption; + use Yii; use yii\helpers\Url; use yii\web\HttpException; diff --git a/console/migrations/m160812_140415_tax_group_to_category.php b/console/migrations/m160812_140415_tax_group_to_category.php new file mode 100644 index 0000000..ce82660 --- /dev/null +++ b/console/migrations/m160812_140415_tax_group_to_category.php @@ -0,0 +1,25 @@ +createTable('tax_group_to_category', [ + 'tax_group_to_category_id' => $this->primaryKey(), + 'tax_group_id' => $this->integer()->notNull(), + 'category_id' => $this->integer()->notNull(), + ]); + + $this->addForeignKey('tax_group_fk', 'tax_group_to_category', 'tax_group_id', 'tax_group', 'tax_group_id', 'CASCADE', 'CASCADE'); + $this->addForeignKey('category_fk', 'tax_group_to_category', 'category_id', 'category', 'category_id', 'CASCADE', 'CASCADE'); + } + + public function down() + { + $this->dropForeignKey('tax_group_fk', 'tax_group_to_category'); + $this->dropForeignKey('category_fk', 'tax_group_to_category'); + $this->dropTable('tax_group_to_category'); + } +} -- libgit2 0.21.4