Commit e16b79fde098b00ab47ecafe5e9cf56a806361d8
1 parent
5aa7418e
Base-product#3 functional
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
common/modules/product/views/manage/_form.php
@@ -90,6 +90,7 @@ use unclead\widgets\MultipleInputColumn; | @@ -90,6 +90,7 @@ use unclead\widgets\MultipleInputColumn; | ||
90 | ]); | 90 | ]); |
91 | ?> | 91 | ?> |
92 | 92 | ||
93 | + <?php if(isset($groups)) :?> | ||
93 | <?php foreach($groups->all() as $group) :?> | 94 | <?php foreach($groups->all() as $group) :?> |
94 | <?= $form->field($model, 'options')->checkboxList( | 95 | <?= $form->field($model, 'options')->checkboxList( |
95 | ArrayHelper::map($group->options, 'tax_option_id', 'ValueRenderFlash'), | 96 | ArrayHelper::map($group->options, 'tax_option_id', 'ValueRenderFlash'), |
@@ -99,6 +100,7 @@ use unclead\widgets\MultipleInputColumn; | @@ -99,6 +100,7 @@ use unclead\widgets\MultipleInputColumn; | ||
99 | ] | 100 | ] |
100 | )->label($group->name);?> | 101 | )->label($group->name);?> |
101 | <?php endforeach?> | 102 | <?php endforeach?> |
103 | + <?php endif?> | ||
102 | 104 | ||
103 | <div class="form-group"> | 105 | <div class="form-group"> |
104 | <?= Html::submitButton($model->isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> | 106 | <?= Html::submitButton($model->isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> |
frontend/controllers/CatalogController.php
@@ -70,7 +70,6 @@ class CatalogController extends \yii\web\Controller | @@ -70,7 +70,6 @@ class CatalogController extends \yii\web\Controller | ||
70 | $brands_count = $brandsQuery->count(); | 70 | $brands_count = $brandsQuery->count(); |
71 | 71 | ||
72 | $optionsQuery = TaxOption::find() | 72 | $optionsQuery = TaxOption::find() |
73 | -// ->select([TaxOption::tableName() .'.tax_option_id', TaxOption::tableName() .'.alias']) | ||
74 | ->innerJoin(ProductOption::tableName(), ProductOption::tableName() .'.option_id='. TaxOption::tableName() .'.tax_option_id') | 73 | ->innerJoin(ProductOption::tableName(), ProductOption::tableName() .'.option_id='. TaxOption::tableName() .'.tax_option_id') |
75 | ->innerJoin(ProductCategory::tableName(), ProductCategory::tableName() .'.product_id='. ProductOption::tableName() .'.product_id') | 74 | ->innerJoin(ProductCategory::tableName(), ProductCategory::tableName() .'.product_id='. ProductOption::tableName() .'.product_id') |
76 | ->where([ | 75 | ->where([ |