Commit 2e22f66f88cd54ea23e067c7241baf31b9c6baeb
1 parent
852cc8d1
Links fixed
Showing
40 changed files
with
134 additions
and
99 deletions
Show diff stats
controllers/TaxGroupController.php
models/LabelSearch.php
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | use yii\data\ActiveDataProvider; | 6 | use yii\data\ActiveDataProvider; |
7 | 7 | ||
8 | /** | 8 | /** |
9 | - * LabelSearch represents the model behind the search form about `backend\models\Label`. | 9 | + * LabelSearch represents the model behind the search form about `artweb\artbox\ecommerce\models\Label`. |
10 | */ | 10 | */ |
11 | class LabelSearch extends Label | 11 | class LabelSearch extends Label |
12 | { | 12 | { |
models/ProductFrontendSearch.php
views/brand/_form.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\modules\language\widgets\LanguageForm; | ||
4 | - use common\modules\product\models\Brand; | ||
5 | - use common\modules\product\models\BrandLang; | 3 | + use artweb\artbox\components\artboximage\ArtboxImageHelper; |
4 | + use artweb\artbox\language\widgets\LanguageForm; | ||
5 | + use artweb\artbox\ecommerce\models\Brand; | ||
6 | + use artweb\artbox\ecommerce\models\BrandLang; | ||
6 | use yii\helpers\Html; | 7 | use yii\helpers\Html; |
7 | use yii\web\View; | 8 | use yii\web\View; |
8 | use yii\widgets\ActiveForm; | 9 | use yii\widgets\ActiveForm; |
@@ -35,7 +36,7 @@ | @@ -35,7 +36,7 @@ | ||
35 | 'gif', | 36 | 'gif', |
36 | 'png', | 37 | 'png', |
37 | ], | 38 | ], |
38 | - 'initialPreview' => !empty( $model->imageUrl ) ? \common\components\artboximage\ArtboxImageHelper::getImage($model->imageUrl, 'list') : '', | 39 | + 'initialPreview' => !empty( $model->imageUrl ) ? ArtboxImageHelper::getImage($model->imageUrl, 'list') : '', |
39 | 'overwriteInitial' => true, | 40 | 'overwriteInitial' => true, |
40 | 'showRemove' => false, | 41 | 'showRemove' => false, |
41 | 'showUpload' => false, | 42 | 'showUpload' => false, |
@@ -47,7 +48,7 @@ | @@ -47,7 +48,7 @@ | ||
47 | 48 | ||
48 | <?= LanguageForm::widget([ | 49 | <?= LanguageForm::widget([ |
49 | 'modelLangs' => $modelLangs, | 50 | 'modelLangs' => $modelLangs, |
50 | - 'formView' => '@backend/views/brand/_form_language', | 51 | + 'formView' => '@artweb/artbox/ecommerce/views/brand/_form_language', |
51 | 'form' => $form, | 52 | 'form' => $form, |
52 | ]) ?> | 53 | ]) ?> |
53 | 54 |
views/brand/_form_language.php
1 | <?php | 1 | <?php |
2 | - use common\modules\language\models\Language; | ||
3 | - use common\modules\product\models\BrandLang; | 2 | + use artweb\artbox\language\models\Language; |
3 | + use artweb\artbox\ecommerce\models\BrandLang; | ||
4 | use yii\web\View; | 4 | use yii\web\View; |
5 | use yii\widgets\ActiveForm; | 5 | use yii\widgets\ActiveForm; |
6 | 6 |
views/brand/create.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\modules\product\models\Brand; | ||
4 | - use common\modules\product\models\BrandLang; | 3 | + use artweb\artbox\ecommerce\models\Brand; |
4 | + use artweb\artbox\ecommerce\models\BrandLang; | ||
5 | use yii\helpers\Html; | 5 | use yii\helpers\Html; |
6 | use yii\web\View; | 6 | use yii\web\View; |
7 | 7 |
views/brand/index.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\modules\product\models\Brand; | ||
4 | - use common\modules\product\models\BrandSearch; | 3 | + use artweb\artbox\ecommerce\models\Brand; |
4 | + use artweb\artbox\ecommerce\models\BrandSearch; | ||
5 | use yii\data\ActiveDataProvider; | 5 | use yii\data\ActiveDataProvider; |
6 | use yii\helpers\Html; | 6 | use yii\helpers\Html; |
7 | use yii\grid\GridView; | 7 | use yii\grid\GridView; |
views/brand/update.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\modules\product\models\Brand; | ||
4 | - use common\modules\product\models\BrandLang; | 3 | + use artweb\artbox\ecommerce\models\Brand; |
4 | + use artweb\artbox\ecommerce\models\BrandLang; | ||
5 | use yii\helpers\Html; | 5 | use yii\helpers\Html; |
6 | use yii\web\View; | 6 | use yii\web\View; |
7 | 7 |
views/brand/view.php
views/category/_form.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\modules\language\widgets\LanguageForm; | ||
4 | - use common\modules\product\models\Category; | ||
5 | - use common\modules\product\models\CategoryLang; | 3 | + use artweb\artbox\components\artboximage\ArtboxImageHelper; |
4 | + use artweb\artbox\language\widgets\LanguageForm; | ||
5 | + use artweb\artbox\ecommerce\models\Category; | ||
6 | + use artweb\artbox\ecommerce\models\CategoryLang; | ||
6 | use yii\helpers\Html; | 7 | use yii\helpers\Html; |
7 | use yii\web\View; | 8 | use yii\web\View; |
8 | use yii\widgets\ActiveForm; | 9 | use yii\widgets\ActiveForm; |
@@ -53,7 +54,7 @@ | @@ -53,7 +54,7 @@ | ||
53 | 'gif', | 54 | 'gif', |
54 | 'png', | 55 | 'png', |
55 | ], | 56 | ], |
56 | - 'initialPreview' => !empty( $model->imageUrl ) ? \common\components\artboximage\ArtboxImageHelper::getImage( | 57 | + 'initialPreview' => !empty( $model->imageUrl ) ? ArtboxImageHelper::getImage( |
57 | $model->imageUrl, | 58 | $model->imageUrl, |
58 | 'list' | 59 | 'list' |
59 | ) : '', | 60 | ) : '', |
@@ -71,7 +72,7 @@ | @@ -71,7 +72,7 @@ | ||
71 | <?= LanguageForm::widget( | 72 | <?= LanguageForm::widget( |
72 | [ | 73 | [ |
73 | 'modelLangs' => $modelLangs, | 74 | 'modelLangs' => $modelLangs, |
74 | - 'formView' => '@backend/views/category/_form_language', | 75 | + 'formView' => '@artweb/artbox/ecommerce/views/category/_form_language', |
75 | 'form' => $form, | 76 | 'form' => $form, |
76 | ] | 77 | ] |
77 | ) ?> | 78 | ) ?> |
views/category/_form_language.php
1 | <?php | 1 | <?php |
2 | - use common\modules\language\models\Language; | ||
3 | - use common\modules\product\models\CategoryLang; | 2 | + use artweb\artbox\language\models\Language; |
3 | + use artweb\artbox\ecommerce\models\CategoryLang; | ||
4 | use yii\web\View; | 4 | use yii\web\View; |
5 | use yii\widgets\ActiveForm; | 5 | use yii\widgets\ActiveForm; |
6 | 6 |
views/category/create.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\modules\product\models\Category; | ||
4 | - use common\modules\product\models\CategoryLang; | 3 | + use artweb\artbox\ecommerce\models\Category; |
4 | + use artweb\artbox\ecommerce\models\CategoryLang; | ||
5 | use yii\helpers\Html; | 5 | use yii\helpers\Html; |
6 | use yii\web\View; | 6 | use yii\web\View; |
7 | 7 |
views/category/index.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\modules\product\models\Category; | 3 | + use artweb\artbox\ecommerce\models\Category; |
4 | use yii\helpers\Html; | 4 | use yii\helpers\Html; |
5 | use kartik\grid\GridView; | 5 | use kartik\grid\GridView; |
6 | 6 | ||
7 | /** | 7 | /** |
8 | * @var $this yii\web\View | 8 | * @var $this yii\web\View |
9 | - * @var $searchModel common\modules\product\models\CategorySearch | 9 | + * @var $searchModel artweb\artbox\ecommerce\models\CategorySearch |
10 | * @var $dataProvider yii\data\ActiveDataProvider | 10 | * @var $dataProvider yii\data\ActiveDataProvider |
11 | */ | 11 | */ |
12 | $this->title = Yii::t('product', 'Categories'); | 12 | $this->title = Yii::t('product', 'Categories'); |
views/category/update.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\modules\product\models\Category; | ||
4 | - use common\modules\product\models\CategoryLang; | 3 | + use artweb\artbox\ecommerce\models\Category; |
4 | + use artweb\artbox\ecommerce\models\CategoryLang; | ||
5 | use yii\helpers\Html; | 5 | use yii\helpers\Html; |
6 | use yii\web\View; | 6 | use yii\web\View; |
7 | 7 |
views/category/view.php
views/delivery/_form.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\models\OrderDeliveryLang; | 3 | + use artweb\artbox\ecommerce\models\OrderDeliveryLang; |
4 | use yii\helpers\Html; | 4 | use yii\helpers\Html; |
5 | use yii\widgets\ActiveForm; | 5 | use yii\widgets\ActiveForm; |
6 | - use common\modules\language\widgets\LanguageForm; | 6 | + use artweb\artbox\language\widgets\LanguageForm; |
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @var yii\web\View $this | 9 | * @var yii\web\View $this |
10 | - * @var common\models\Delivery $model | 10 | + * @var artweb\artbox\ecommerce\models\Delivery $model |
11 | * @var yii\widgets\ActiveForm $form | 11 | * @var yii\widgets\ActiveForm $form |
12 | * @var OrderDeliveryLang[] $modelLangs | 12 | * @var OrderDeliveryLang[] $modelLangs |
13 | */ | 13 | */ |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | 30 | ||
31 | <?= LanguageForm::widget([ | 31 | <?= LanguageForm::widget([ |
32 | 'modelLangs' => $modelLangs, | 32 | 'modelLangs' => $modelLangs, |
33 | - 'formView' => '@backend/views/delivery/_form_language', | 33 | + 'formView' => '@artweb/artbox/ecommerce/views/delivery/_form_language', |
34 | 'form' => $form, | 34 | 'form' => $form, |
35 | ]) ?> | 35 | ]) ?> |
36 | 36 |
views/delivery/_form_language.php
1 | <?php | 1 | <?php |
2 | - use common\models\OrderDeliveryLang; | ||
3 | - use common\modules\language\models\Language; | 2 | + use artweb\artbox\ecommerce\models\OrderDeliveryLang; |
3 | + use artweb\artbox\language\models\Language; | ||
4 | use yii\web\View; | 4 | use yii\web\View; |
5 | use yii\widgets\ActiveForm; | 5 | use yii\widgets\ActiveForm; |
6 | 6 |
views/delivery/create.php
views/delivery/index.php
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | use yii\grid\GridView; | 4 | use yii\grid\GridView; |
5 | use yii\web\View; | 5 | use yii\web\View; |
6 | use yii\data\ActiveDataProvider; | 6 | use yii\data\ActiveDataProvider; |
7 | - use common\models\DeliverySearch; | 7 | + use artweb\artbox\ecommerce\models\DeliverySearch; |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * @var View $this | 10 | * @var View $this |
views/delivery/update.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use common\models\OrderDeliveryLang; | 3 | + use artweb\artbox\ecommerce\models\OrderDeliveryLang; |
4 | use yii\helpers\Html; | 4 | use yii\helpers\Html; |
5 | - use common\models\Delivery; | 5 | + use artweb\artbox\ecommerce\models\Delivery; |
6 | use yii\web\View; | 6 | use yii\web\View; |
7 | 7 | ||
8 | /** | 8 | /** |
views/delivery/view.php
views/label/_form.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | - use backend\models\Label; | ||
4 | - use backend\models\OrderLabelLang; | ||
5 | - use common\modules\language\widgets\LanguageForm; | 3 | + use artweb\artbox\ecommerce\models\Label; |
4 | + use artweb\artbox\ecommerce\models\OrderLabelLang; | ||
5 | + use artweb\artbox\language\widgets\LanguageForm; | ||
6 | use yii\helpers\Html; | 6 | use yii\helpers\Html; |
7 | use yii\web\View; | 7 | use yii\web\View; |
8 | use yii\widgets\ActiveForm; | 8 | use yii\widgets\ActiveForm; |
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | 23 | ||
24 | <?= LanguageForm::widget([ | 24 | <?= LanguageForm::widget([ |
25 | 'modelLangs' => $modelLangs, | 25 | 'modelLangs' => $modelLangs, |
26 | - 'formView' => '@backend/views/label/_form_language', | 26 | + 'formView' => '@artweb/artbox/ecommerce/views/label/_form_language', |
27 | 'form' => $form, | 27 | 'form' => $form, |
28 | ]) ?> | 28 | ]) ?> |
29 | 29 |
views/label/_form_language.php
1 | <?php | 1 | <?php |
2 | - use common\models\OrderDeliveryLang; | ||
3 | - use common\modules\language\models\Language; | 2 | + use artweb\artbox\ecommerce\models\OrderDeliveryLang; |
3 | + use artweb\artbox\language\models\Language; | ||
4 | use yii\web\View; | 4 | use yii\web\View; |
5 | use yii\widgets\ActiveForm; | 5 | use yii\widgets\ActiveForm; |
6 | 6 |
views/label/create.php
views/label/index.php
views/label/update.php
views/label/view.php
views/manage/index.php
views/manage/view.php
@@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
36 | $variants_string .= Html::a( | 36 | $variants_string .= Html::a( |
37 | $variant->lang->title, | 37 | $variant->lang->title, |
38 | [ | 38 | [ |
39 | - '/product/variant/view', | 39 | + 'variant/view', |
40 | 'id' => $variant->id, | 40 | 'id' => $variant->id, |
41 | ] | 41 | ] |
42 | ) . '<br>'; | 42 | ) . '<br>'; |
@@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
72 | <?= Html::a( | 72 | <?= Html::a( |
73 | Yii::t('product', 'Variants'), | 73 | Yii::t('product', 'Variants'), |
74 | [ | 74 | [ |
75 | - '/product/variant/index', | 75 | + 'variant/index', |
76 | 'product_id' => $model->id, | 76 | 'product_id' => $model->id, |
77 | ], | 77 | ], |
78 | [ 'class' => 'btn btn-info' ] | 78 | [ 'class' => 'btn btn-info' ] |
views/tax-group/_form.php
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | use yii\web\View; | 7 | use yii\web\View; |
8 | use yii\widgets\ActiveForm; | 8 | use yii\widgets\ActiveForm; |
9 | use artweb\artbox\ecommerce\helpers\ProductHelper; | 9 | use artweb\artbox\ecommerce\helpers\ProductHelper; |
10 | - use artweb\artbox\ecommerce\components\artboxtree\ArtboxTreeHelper; | 10 | + use artweb\artbox\components\artboxtree\ArtboxTreeHelper; |
11 | 11 | ||
12 | /** | 12 | /** |
13 | * @var View $this | 13 | * @var View $this |
views/tax-group/create.php
@@ -9,11 +9,15 @@ | @@ -9,11 +9,15 @@ | ||
9 | * @var View $this | 9 | * @var View $this |
10 | * @var TaxGroup $model | 10 | * @var TaxGroup $model |
11 | * @var TaxGroupLang[] $modelLangs | 11 | * @var TaxGroupLang[] $modelLangs |
12 | + * @var int $level | ||
12 | */ | 13 | */ |
13 | $this->title = Yii::t('rubrication', 'Create Tax Group'); | 14 | $this->title = Yii::t('rubrication', 'Create Tax Group'); |
14 | $this->params[ 'breadcrumbs' ][] = [ | 15 | $this->params[ 'breadcrumbs' ][] = [ |
15 | 'label' => Yii::t('rubrication', 'Tax Groups'), | 16 | 'label' => Yii::t('rubrication', 'Tax Groups'), |
16 | - 'url' => [ 'index' ], | 17 | + 'url' => [ |
18 | + 'index', | ||
19 | + 'level' => $level, | ||
20 | + ], | ||
17 | ]; | 21 | ]; |
18 | $this->params[ 'breadcrumbs' ][] = $this->title; | 22 | $this->params[ 'breadcrumbs' ][] = $this->title; |
19 | ?> | 23 | ?> |
@@ -21,9 +25,12 @@ | @@ -21,9 +25,12 @@ | ||
21 | 25 | ||
22 | <h1><?= Html::encode($this->title) ?></h1> | 26 | <h1><?= Html::encode($this->title) ?></h1> |
23 | 27 | ||
24 | - <?= $this->render('_form', [ | ||
25 | - 'model' => $model, | ||
26 | - 'modelLangs' => $modelLangs, | ||
27 | - ]) ?> | 28 | + <?= $this->render( |
29 | + '_form', | ||
30 | + [ | ||
31 | + 'model' => $model, | ||
32 | + 'modelLangs' => $modelLangs, | ||
33 | + ] | ||
34 | + ) ?> | ||
28 | 35 | ||
29 | </div> | 36 | </div> |
views/tax-group/index.php
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | Yii::t('rubrication', 'Create Group'), | 27 | Yii::t('rubrication', 'Create Group'), |
28 | Url::to( | 28 | Url::to( |
29 | [ | 29 | [ |
30 | - '/rubrication/tax-group/create', | 30 | + 'tax-group/create', |
31 | 'level' => $level, | 31 | 'level' => $level, |
32 | ] | 32 | ] |
33 | ), | 33 | ), |
@@ -38,18 +38,18 @@ | @@ -38,18 +38,18 @@ | ||
38 | <?= GridView::widget( | 38 | <?= GridView::widget( |
39 | [ | 39 | [ |
40 | 'dataProvider' => $dataProvider, | 40 | 'dataProvider' => $dataProvider, |
41 | - 'filterModel' => $searchModel, | 41 | + 'filterModel' => $searchModel, |
42 | 'columns' => [ | 42 | 'columns' => [ |
43 | [ 'class' => 'yii\grid\SerialColumn' ], | 43 | [ 'class' => 'yii\grid\SerialColumn' ], |
44 | 'id', | 44 | 'id', |
45 | [ | 45 | [ |
46 | 'attribute' => 'is_filter', | 46 | 'attribute' => 'is_filter', |
47 | - 'format' => 'boolean', | ||
48 | - 'filter' => \Yii::$app->formatter->booleanFormat, | 47 | + 'format' => 'boolean', |
48 | + 'filter' => \Yii::$app->formatter->booleanFormat, | ||
49 | ], | 49 | ], |
50 | [ | 50 | [ |
51 | 'attribute' => 'groupName', | 51 | 'attribute' => 'groupName', |
52 | - 'value' => 'lang.title', | 52 | + 'value' => 'lang.title', |
53 | ], | 53 | ], |
54 | [ | 54 | [ |
55 | 'label' => \Yii::t('rubrication', 'Options count'), | 55 | 'label' => \Yii::t('rubrication', 'Options count'), |
@@ -85,12 +85,17 @@ | @@ -85,12 +85,17 @@ | ||
85 | ], | 85 | ], |
86 | 'urlCreator' => function ($action, $model, $key, $index) use ($level) { | 86 | 'urlCreator' => function ($action, $model, $key, $index) use ($level) { |
87 | if ($action === 'options') { | 87 | if ($action === 'options') { |
88 | - $url = '/admin/rubrication/tax-option?group=' . $model->id; | 88 | + $url = Url::to( |
89 | + [ | ||
90 | + 'tax-option/index', | ||
91 | + 'group' => $model->id, | ||
92 | + ] | ||
93 | + ); | ||
89 | return $url; | 94 | return $url; |
90 | } elseif ($action === 'update') { | 95 | } elseif ($action === 'update') { |
91 | $url = Url::to( | 96 | $url = Url::to( |
92 | [ | 97 | [ |
93 | - '/rubrication/tax-group/update', | 98 | + 'tax-group/update', |
94 | 'level' => $level, | 99 | 'level' => $level, |
95 | 'id' => $model->id, | 100 | 'id' => $model->id, |
96 | ] | 101 | ] |
@@ -99,7 +104,7 @@ | @@ -99,7 +104,7 @@ | ||
99 | } elseif ($action === 'delete') { | 104 | } elseif ($action === 'delete') { |
100 | $url = Url::to( | 105 | $url = Url::to( |
101 | [ | 106 | [ |
102 | - '/rubrication/tax-group/delete', | 107 | + 'tax-group/delete', |
103 | 'level' => $level, | 108 | 'level' => $level, |
104 | 'id' => $model->id, | 109 | 'id' => $model->id, |
105 | ] | 110 | ] |
views/tax-option/_form.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | + use artweb\artbox\components\artboximage\ArtboxImageHelper; | ||
3 | use artweb\artbox\language\widgets\LanguageForm; | 4 | use artweb\artbox\language\widgets\LanguageForm; |
4 | use artweb\artbox\ecommerce\models\TaxGroup; | 5 | use artweb\artbox\ecommerce\models\TaxGroup; |
5 | use artweb\artbox\ecommerce\models\TaxOptionLang; | 6 | use artweb\artbox\ecommerce\models\TaxOptionLang; |
@@ -54,7 +55,7 @@ | @@ -54,7 +55,7 @@ | ||
54 | 'gif', | 55 | 'gif', |
55 | 'png', | 56 | 'png', |
56 | ], | 57 | ], |
57 | - 'initialPreview' => !empty( $model->imageUrl ) ? \artweb\artbox\ecommerce\components\artboximage\ArtboxImageHelper::getImage( | 58 | + 'initialPreview' => !empty( $model->imageUrl ) ? ArtboxImageHelper::getImage( |
58 | $model->imageUrl, | 59 | $model->imageUrl, |
59 | 'list' | 60 | 'list' |
60 | ) : '', | 61 | ) : '', |
views/variant/create.php
@@ -19,12 +19,12 @@ | @@ -19,12 +19,12 @@ | ||
19 | $this->title = Yii::t('product', 'Create Variant'); | 19 | $this->title = Yii::t('product', 'Create Variant'); |
20 | $this->params[ 'breadcrumbs' ][] = [ | 20 | $this->params[ 'breadcrumbs' ][] = [ |
21 | 'label' => Yii::t('product', 'Products'), | 21 | 'label' => Yii::t('product', 'Products'), |
22 | - 'url' => [ '/product/manage/index' ], | 22 | + 'url' => [ 'manage/index' ], |
23 | ]; | 23 | ]; |
24 | $this->params[ 'breadcrumbs' ][] = [ | 24 | $this->params[ 'breadcrumbs' ][] = [ |
25 | 'label' => $product->lang->title, | 25 | 'label' => $product->lang->title, |
26 | 'url' => [ | 26 | 'url' => [ |
27 | - '/product/manage/view', | 27 | + 'manage/view', |
28 | 'id' => $product->id, | 28 | 'id' => $product->id, |
29 | ], | 29 | ], |
30 | ]; | 30 | ]; |
views/variant/index.php
@@ -18,12 +18,12 @@ | @@ -18,12 +18,12 @@ | ||
18 | $this->title = Yii::t('product', 'Variants for ') . $product->lang->title; | 18 | $this->title = Yii::t('product', 'Variants for ') . $product->lang->title; |
19 | $this->params[ 'breadcrumbs' ][] = [ | 19 | $this->params[ 'breadcrumbs' ][] = [ |
20 | 'label' => Yii::t('product', 'Products'), | 20 | 'label' => Yii::t('product', 'Products'), |
21 | - 'url' => [ '/product/manage/index' ], | 21 | + 'url' => [ 'manage/index' ], |
22 | ]; | 22 | ]; |
23 | $this->params[ 'breadcrumbs' ][] = [ | 23 | $this->params[ 'breadcrumbs' ][] = [ |
24 | 'label' => $product->lang->title, | 24 | 'label' => $product->lang->title, |
25 | 'url' => [ | 25 | 'url' => [ |
26 | - '/product/manage/view', | 26 | + 'manage/view', |
27 | 'id' => $product->id, | 27 | 'id' => $product->id, |
28 | ], | 28 | ], |
29 | ]; | 29 | ]; |
views/variant/update.php
@@ -26,12 +26,12 @@ | @@ -26,12 +26,12 @@ | ||
26 | ) . ' ' . $model->lang->title; | 26 | ) . ' ' . $model->lang->title; |
27 | $this->params[ 'breadcrumbs' ][] = [ | 27 | $this->params[ 'breadcrumbs' ][] = [ |
28 | 'label' => Yii::t('product', 'Products'), | 28 | 'label' => Yii::t('product', 'Products'), |
29 | - 'url' => [ '/product/manage/index' ], | 29 | + 'url' => [ 'manage/index' ], |
30 | ]; | 30 | ]; |
31 | $this->params[ 'breadcrumbs' ][] = [ | 31 | $this->params[ 'breadcrumbs' ][] = [ |
32 | 'label' => $model->product->lang->title, | 32 | 'label' => $model->product->lang->title, |
33 | 'url' => [ | 33 | 'url' => [ |
34 | - '/product/manage/view', | 34 | + 'manage/view', |
35 | 'id' => $model->product->id, | 35 | 'id' => $model->product->id, |
36 | ], | 36 | ], |
37 | ]; | 37 | ]; |
views/variant/view.php
@@ -15,18 +15,21 @@ | @@ -15,18 +15,21 @@ | ||
15 | $this->title = $model->lang->title; | 15 | $this->title = $model->lang->title; |
16 | $this->params[ 'breadcrumbs' ][] = [ | 16 | $this->params[ 'breadcrumbs' ][] = [ |
17 | 'label' => Yii::t('product', 'Products'), | 17 | 'label' => Yii::t('product', 'Products'), |
18 | - 'url' => [ 'index' ], | 18 | + 'url' => [ 'manage/index' ], |
19 | ]; | 19 | ]; |
20 | $this->params[ 'breadcrumbs' ][] = [ | 20 | $this->params[ 'breadcrumbs' ][] = [ |
21 | 'label' => $model->product->lang->title, | 21 | 'label' => $model->product->lang->title, |
22 | 'url' => [ | 22 | 'url' => [ |
23 | - 'view', | 23 | + 'manage/view', |
24 | 'id' => $model->product->id, | 24 | 'id' => $model->product->id, |
25 | ], | 25 | ], |
26 | ]; | 26 | ]; |
27 | $this->params[ 'breadcrumbs' ][] = [ | 27 | $this->params[ 'breadcrumbs' ][] = [ |
28 | 'label' => Yii::t('product', 'Variants'), | 28 | 'label' => Yii::t('product', 'Variants'), |
29 | - 'url' => [ '/product/variant?product_id=' . $model->product->id ], | 29 | + 'url' => [ |
30 | + 'variant/index', | ||
31 | + 'product_id' => $model->product->id, | ||
32 | + ], | ||
30 | ]; | 33 | ]; |
31 | $this->params[ 'breadcrumbs' ][] = $this->title; | 34 | $this->params[ 'breadcrumbs' ][] = $this->title; |
32 | $properties_string = ''; | 35 | $properties_string = ''; |
@@ -83,7 +86,7 @@ | @@ -83,7 +86,7 @@ | ||
83 | 'value' => Html::a( | 86 | 'value' => Html::a( |
84 | $model->product->fullname, | 87 | $model->product->fullname, |
85 | [ | 88 | [ |
86 | - '/product/manage/view', | 89 | + 'product/manage/view', |
87 | 'id' => $model->id, | 90 | 'id' => $model->id, |
88 | ] | 91 | ] |
89 | ), | 92 | ), |
widgets/views/brandsCarousel.php
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | /** | 2 | /** |
3 | * @var Brand[] $brands | 3 | * @var Brand[] $brands |
4 | */ | 4 | */ |
5 | - use artweb\artbox\ecommerce\components\artboximage\ArtboxImageHelper; | 5 | + use artweb\artbox\components\artboximage\ArtboxImageHelper; |
6 | use artweb\artbox\ecommerce\models\Brand; | 6 | use artweb\artbox\ecommerce\models\Brand; |
7 | 7 | ||
8 | ?> | 8 | ?> |
@@ -10,9 +10,14 @@ | @@ -10,9 +10,14 @@ | ||
10 | <div class="pc_prev"></div> | 10 | <div class="pc_prev"></div> |
11 | <div class="prods_carousel"> | 11 | <div class="prods_carousel"> |
12 | <ul> | 12 | <ul> |
13 | - <?php foreach($brands as $brand) { ?> | 13 | + <?php foreach ($brands as $brand) { ?> |
14 | <li> | 14 | <li> |
15 | - <span><a href="<?= \yii\helpers\Url::to('/brands/' . $brand->lang->alias) ?>" title="<?= $brand->lang->title ?>"><?= $brand->image ? ArtboxImageHelper::getImage($brand->imageFile, 'brandlist') : '' ?></a></span> | 15 | + <span><a href="<?= \yii\helpers\Url::to( |
16 | + '/brands/' . $brand->lang->alias | ||
17 | + ) ?>" title="<?= $brand->lang->title ?>"><?= $brand->image ? ArtboxImageHelper::getImage( | ||
18 | + $brand->imageFile, | ||
19 | + 'brandlist' | ||
20 | + ) : '' ?></a></span> | ||
16 | </li> | 21 | </li> |
17 | <?php } ?> | 22 | <?php } ?> |
18 | </ul> | 23 | </ul> |
widgets/views/product_smart.php
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | /** | 2 | /** |
3 | * @var $product artweb\artbox\ecommerce\models\Product | 3 | * @var $product artweb\artbox\ecommerce\models\Product |
4 | */ | 4 | */ |
5 | + use artweb\artbox\components\artboximage\ArtboxImageHelper; | ||
5 | use yii\helpers\Html; | 6 | use yii\helpers\Html; |
6 | use yii\helpers\Url; | 7 | use yii\helpers\Url; |
7 | 8 | ||
@@ -29,7 +30,7 @@ | @@ -29,7 +30,7 @@ | ||
29 | 'product' => $product->lang->alias, | 30 | 'product' => $product->lang->alias, |
30 | ] | 31 | ] |
31 | ) ?>"> | 32 | ) ?>"> |
32 | - <?= \artweb\artbox\ecommerce\components\artboximage\ArtboxImageHelper::getImage( | 33 | + <?= ArtboxImageHelper::getImage( |
33 | $product->enabledVariants[ 0 ]->imageUrl, | 34 | $product->enabledVariants[ 0 ]->imageUrl, |
34 | 'list', | 35 | 'list', |
35 | [ | 36 | [ |
widgets/views/submenu.php
@@ -3,32 +3,42 @@ | @@ -3,32 +3,42 @@ | ||
3 | * @var Category $rootCategory | 3 | * @var Category $rootCategory |
4 | * @var string $rootClass | 4 | * @var string $rootClass |
5 | */ | 5 | */ |
6 | + use artweb\artbox\components\artboximage\ArtboxImageHelper; | ||
6 | use artweb\artbox\ecommerce\models\Category; | 7 | use artweb\artbox\ecommerce\models\Category; |
7 | 8 | ||
8 | ?> | 9 | ?> |
9 | <div class="menu_item"> | 10 | <div class="menu_item"> |
10 | - <?= \yii\helpers\Html::a($rootCategory->lang->title, [ | ||
11 | - 'catalog/category', | ||
12 | - 'category' => $rootCategory, | ||
13 | - ], [ 'class' => 'submenu_button ' . $rootClass ]) ?> | 11 | + <?= \yii\helpers\Html::a( |
12 | + $rootCategory->lang->title, | ||
13 | + [ | ||
14 | + 'catalog/category', | ||
15 | + 'category' => $rootCategory, | ||
16 | + ], | ||
17 | + [ 'class' => 'submenu_button ' . $rootClass ] | ||
18 | + ) ?> | ||
14 | <div class="submenu"> | 19 | <div class="submenu"> |
15 | <ul class="categories"> | 20 | <ul class="categories"> |
16 | - <?php foreach($items as $item) : ?> | 21 | + <?php foreach ($items as $item) : ?> |
17 | <li class="sub_cat"> | 22 | <li class="sub_cat"> |
18 | <span><?= $item[ 'item' ]->title ?></span> | 23 | <span><?= $item[ 'item' ]->title ?></span> |
19 | - <?php if(!empty( $item[ 'children' ] )) : ?> | 24 | + <?php if (!empty( $item[ 'children' ] )) : ?> |
20 | <div class="sub_cat_content"> | 25 | <div class="sub_cat_content"> |
21 | <div class="content_items"> | 26 | <div class="content_items"> |
22 | - <?php foreach($item[ 'children' ] as $_item) : ?> | ||
23 | - <div class="content_item"><a href="<?= \yii\helpers\Url::to([ | ||
24 | - 'catalog/category', | ||
25 | - 'category' => $_item[ 'item' ], | ||
26 | - ]) ?>"> | 27 | + <?php foreach ($item[ 'children' ] as $_item) : ?> |
28 | + <div class="content_item"><a href="<?= \yii\helpers\Url::to( | ||
29 | + [ | ||
30 | + 'catalog/category', | ||
31 | + 'category' => $_item[ 'item' ], | ||
32 | + ] | ||
33 | + ) ?>"> | ||
27 | <div class="picture"> | 34 | <div class="picture"> |
28 | - <?php if(empty( $_item[ 'item' ]->image )) : ?> | 35 | + <?php if (empty( $_item[ 'item' ]->image )) : ?> |
29 | <img src="/images/no_photo.png"> | 36 | <img src="/images/no_photo.png"> |
30 | <?php else : ?> | 37 | <?php else : ?> |
31 | - <?= $_item[ 'item' ]->imageUrl ? \artweb\artbox\ecommerce\components\artboximage\ArtboxImageHelper::getImage($_item[ 'item' ]->imageUrl, 'mainmenu') : '' ?> | 38 | + <?= $_item[ 'item' ]->imageUrl ? ArtboxImageHelper::getImage( |
39 | + $_item[ 'item' ]->imageUrl, | ||
40 | + 'mainmenu' | ||
41 | + ) : '' ?> | ||
32 | <?php endif ?> | 42 | <?php endif ?> |
33 | </div> | 43 | </div> |
34 | <div class="title"><?= $_item[ 'item' ]->title ?></div> | 44 | <div class="title"><?= $_item[ 'item' ]->title ?></div> |