Commit 464d2610242e2b03cc1642ed1f3db3d77943c68c
1 parent
3e703aac
add variantSku
Showing
3 changed files
with
12 additions
and
21 deletions
Show diff stats
CatalogUrlManager.php
... | ... | @@ -119,10 +119,10 @@ |
119 | 119 | ) ? $params[ 'category' ]->lang->alias : strtolower( |
120 | 120 | $params[ 'category' ] |
121 | 121 | ); |
122 | - $url = 'catalog/' . $category_alias . '/'; | |
122 | + $url = 'catalog/' . $category_alias ; | |
123 | 123 | unset( $params[ 'category' ] ); |
124 | 124 | } else { |
125 | - $url = 'catalog/'; | |
125 | + $url = 'catalog'; | |
126 | 126 | } |
127 | 127 | |
128 | 128 | $this->setFilterUrl($params, $url); | ... | ... |
controllers/TaxOptionController.php
... | ... | @@ -42,16 +42,18 @@ |
42 | 42 | $group = $this->findGroup(Yii::$app->request->queryParams[ 'group' ]); |
43 | 43 | $searchModel = new TaxOptionSearch(); |
44 | 44 | $dataProvider = $searchModel->search(Yii::$app->request->queryParams); |
45 | + | |
45 | 46 | /** |
46 | 47 | * @var ActiveQuery $query |
47 | 48 | */ |
48 | 49 | $query = $dataProvider->query; |
49 | 50 | $query->andWhere([ 'tax_group_id' => $group->id ]); |
50 | - if ($group->level) { | |
51 | - $query->with('productVariants'); | |
52 | - } else { | |
53 | - $query->with('products'); | |
54 | - } | |
51 | +// if ($group->level) { | |
52 | +// $query->with('productVariants'); | |
53 | +// } else { | |
54 | +// $query->with('products'); | |
55 | +// } | |
56 | + | |
55 | 57 | return $this->render( |
56 | 58 | 'index', |
57 | 59 | [ | ... | ... |
views/tax-option/index.php
... | ... | @@ -32,11 +32,12 @@ |
32 | 32 | ], |
33 | 33 | ]; |
34 | 34 | $this->params[ 'breadcrumbs' ][] = $this->title; |
35 | + | |
35 | 36 | ?> |
36 | 37 | <div class="tax-option-index"> |
37 | 38 | |
38 | 39 | <h1><?= Html::encode($this->title) ?></h1> |
39 | - | |
40 | + | |
40 | 41 | <p> |
41 | 42 | <?= Html::a( |
42 | 43 | Yii::t('rubrication', 'Create Option'), |
... | ... | @@ -44,7 +45,7 @@ |
44 | 45 | [ 'class' => 'btn btn-success' ] |
45 | 46 | ) ?> |
46 | 47 | </p> |
47 | - | |
48 | + | |
48 | 49 | <?php echo GridView::widget( |
49 | 50 | [ |
50 | 51 | 'dataProvider' => $dataProvider, |
... | ... | @@ -58,18 +59,6 @@ |
58 | 59 | ], |
59 | 60 | 'imageUrl:image', |
60 | 61 | [ |
61 | - 'label' => $group->level ? \Yii::t('rubrication', 'Variants count') : \Yii::t( | |
62 | - 'rubrication', | |
63 | - 'Products count' | |
64 | - ), | |
65 | - 'value' => function ($model) use ($group) { | |
66 | - /** | |
67 | - * @var TaxOption $model | |
68 | - */ | |
69 | - return count($group->level ? $model->productVariants : $model->products); | |
70 | - }, | |
71 | - ], | |
72 | - [ | |
73 | 62 | 'class' => 'yii\grid\ActionColumn', |
74 | 63 | 'template' => '{update} {delete}', |
75 | 64 | ], | ... | ... |