Commit 19fa91c7be923fda54dc719a1a41862ffce89fd7
1 parent
c4adf56b
big commti
Showing
2 changed files
with
27 additions
and
4 deletions
Show diff stats
common/modules/product/CatalogUrlManager.php
| ... | ... | @@ -2,12 +2,10 @@ |
| 2 | 2 | |
| 3 | 3 | namespace common\modules\product; |
| 4 | 4 | |
| 5 | -use common\modules\product\helpers\FilterHelper; | |
| 6 | -use common\modules\product\models\Brand; | |
| 7 | -use common\modules\product\models\BrandSearch; | |
| 5 | + | |
| 8 | 6 | use common\modules\product\models\CategorySearch; |
| 9 | 7 | use common\modules\product\models\ProductSearch; |
| 10 | -use common\modules\rubrication\models\TaxOption; | |
| 8 | + | |
| 11 | 9 | use Yii; |
| 12 | 10 | use yii\helpers\Url; |
| 13 | 11 | use yii\web\HttpException; | ... | ... |
console/migrations/m160812_140415_tax_group_to_category.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +use yii\db\Migration; | |
| 4 | + | |
| 5 | +class m160812_140415_tax_group_to_category extends Migration | |
| 6 | +{ | |
| 7 | + public function up() | |
| 8 | + { | |
| 9 | + $this->createTable('tax_group_to_category', [ | |
| 10 | + 'tax_group_to_category_id' => $this->primaryKey(), | |
| 11 | + 'tax_group_id' => $this->integer()->notNull(), | |
| 12 | + 'category_id' => $this->integer()->notNull(), | |
| 13 | + ]); | |
| 14 | + | |
| 15 | + $this->addForeignKey('tax_group_fk', 'tax_group_to_category', 'tax_group_id', 'tax_group', 'tax_group_id', 'CASCADE', 'CASCADE'); | |
| 16 | + $this->addForeignKey('category_fk', 'tax_group_to_category', 'category_id', 'category', 'category_id', 'CASCADE', 'CASCADE'); | |
| 17 | + } | |
| 18 | + | |
| 19 | + public function down() | |
| 20 | + { | |
| 21 | + $this->dropForeignKey('tax_group_fk', 'tax_group_to_category'); | |
| 22 | + $this->dropForeignKey('category_fk', 'tax_group_to_category'); | |
| 23 | + $this->dropTable('tax_group_to_category'); | |
| 24 | + } | |
| 25 | +} | ... | ... |