Commit 8813e60ccb06297fa3095f23419acfafaf751cee

Authored by Eugeny Galkovskiy
2 parents 3f349ac0 69bea869

Merge remote-tracking branch 'origin/master'

Showing 48 changed files with 185 additions and 163 deletions   Show diff stats
backend/controllers/BlogCategoryController.php 100644 → 100755
backend/views/blog-category/_form.php 100644 → 100755
backend/views/blog-category/_search.php 100644 → 100755
backend/views/blog-category/create.php 100644 → 100755
backend/views/blog-category/index.php 100644 → 100755
backend/views/blog-category/update.php 100644 → 100755
backend/views/blog-category/view.php 100644 → 100755
backend/views/blog/_form.php
@@ -25,11 +25,6 @@ @@ -25,11 +25,6 @@
25 'dateFormat' => 'dd-MM-yyyy', 25 'dateFormat' => 'dd-MM-yyyy',
26 ]) ?> 26 ]) ?>
27 27
28 - <?= $form->field($model, 'date_end')  
29 - ->widget(DatePicker::className(), [  
30 - 'dateFormat' => 'dd-MM-yyyy',  
31 - ]) ?>  
32 -  
33 <?= $form->field($model, 'title') 28 <?= $form->field($model, 'title')
34 ->textInput([ 'maxlength' => true ]) ?> 29 ->textInput([ 'maxlength' => true ]) ?>
35 30
backend/views/category/_form.php
@@ -22,6 +22,10 @@ use kartik\select2\Select2; @@ -22,6 +22,10 @@ use kartik\select2\Select2;
22 <?= $form->field($model, 'name')->textInput() ?> 22 <?= $form->field($model, 'name')->textInput() ?>
23 23
24 <?= $form->field($model, 'new_collection')->checkbox() ?> 24 <?= $form->field($model, 'new_collection')->checkbox() ?>
  25 +
  26 + <?= $form->field($model, 'stock_program')->checkbox() ?>
  27 +
  28 + <?= $form->field($model, 'on_order')->checkbox() ?>
25 29
26 <?= $form->field($model, 'first_text')->textInput() ?> 30 <?= $form->field($model, 'first_text')->textInput() ?>
27 31
@@ -30,11 +34,11 @@ use kartik\select2\Select2; @@ -30,11 +34,11 @@ use kartik\select2\Select2;
30 <?= $form->field($model, 'alias')->textInput(['maxlength' => true]) ?> 34 <?= $form->field($model, 'alias')->textInput(['maxlength' => true]) ?>
31 35
32 <?= $form->field($model, 'parent_id')->dropDownList($categories, [ 36 <?= $form->field($model, 'parent_id')->dropDownList($categories, [
33 - 'prompt' => Yii::t('rubrication', 'Root category'), 37 + 'prompt' => Yii::t('rubrication', 'Корневая'),
34 'options' => [ 38 'options' => [
35 $model->category_id => ['disabled' => true] 39 $model->category_id => ['disabled' => true]
36 ] 40 ]
37 - ])->label(Yii::t('product', 'Parent category')) ?> 41 + ])->label('Родительская категория') ?>
38 42
39 <?php 43 <?php
40 /* Tax group - add to controller 44 /* Tax group - add to controller
@@ -104,10 +108,6 @@ use kartik\select2\Select2; @@ -104,10 +108,6 @@ use kartik\select2\Select2;
104 ) 108 )
105 ]) ?> 109 ]) ?>
106 110
107 - <?= $form->field($model, 'stock_program')->checkbox() ?>  
108 -  
109 - <?= $form->field($model, 'on_order')->checkbox() ?>  
110 -  
111 <div class="form-group"> 111 <div class="form-group">
112 <?= Html::submitButton($model->isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> 112 <?= Html::submitButton($model->isNewRecord ? Yii::t('product', 'Create') : Yii::t('product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
113 <?php if ($model->isNewRecord) :?> 113 <?php if ($model->isNewRecord) :?>
backend/views/layouts/main-sidebar.php
@@ -10,15 +10,15 @@ use yii\widgets\Menu; @@ -10,15 +10,15 @@ use yii\widgets\Menu;
10 // die(); 10 // die();
11 11
12 $items = [ 12 $items = [
13 - [  
14 - 'label' => 'Заказы',  
15 - 'url' => ['/orders/index'],  
16 - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-shopping-cart"></i> <span>{label}</span></a>',  
17 - 'options' => ['class'=>\Yii::$app->user->can('orders') ? '' :'hide'],  
18 - ], 13 +// [
  14 +// 'label' => 'Заказы',
  15 +// 'url' => ['/orders/index'],
  16 +// 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-shopping-cart"></i> <span>{label}</span></a>',
  17 +// 'options' => ['class'=>\Yii::$app->user->can('orders') ? '' :'hide'],
  18 +// ],
19 [ 19 [
20 'label' => 'eCommerce', 20 'label' => 'eCommerce',
21 - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-barcode"></i> <span>{label}</span></a>', 21 + 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-shopping-cart"></i> <span>{label}</span></a>',
22 'url' => ['/product/manage'], 22 'url' => ['/product/manage'],
23 'active' => preg_match('/^manage.*$/', $this->context->id) || 23 'active' => preg_match('/^manage.*$/', $this->context->id) ||
24 preg_match('/^category.*$/', $this->context->id) || 24 preg_match('/^category.*$/', $this->context->id) ||
@@ -45,11 +45,11 @@ use yii\widgets\Menu; @@ -45,11 +45,11 @@ use yii\widgets\Menu;
45 'options' => ['class'=>\Yii::$app->user->can('category') ? '' :'hide'], 45 'options' => ['class'=>\Yii::$app->user->can('category') ? '' :'hide'],
46 46
47 ], 47 ],
48 - [  
49 - 'label' => 'Бренды',  
50 - 'url' => ['/brand'],  
51 - 'options' => ['class'=>\Yii::$app->user->can('brand') ? '' :'hide'],  
52 - ], 48 +// [
  49 +// 'label' => 'Бренды',
  50 +// 'url' => ['/brand'],
  51 +// 'options' => ['class'=>\Yii::$app->user->can('brand') ? '' :'hide'],
  52 +// ],
53 [ 53 [
54 'label' => 'Единицы измерения', 54 'label' => 'Единицы измерения',
55 'url' => ['/product/product-unit'], 55 'url' => ['/product/product-unit'],
@@ -78,22 +78,11 @@ use yii\widgets\Menu; @@ -78,22 +78,11 @@ use yii\widgets\Menu;
78 ] 78 ]
79 ], 79 ],
80 [ 80 [
81 - 'label' => 'Слайдер/Банеры', 81 + 'label' => 'Слайдер',
82 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-picture"></i> <span>{label}</span></a>', 82 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-picture"></i> <span>{label}</span></a>',
  83 + 'url' => ['/slider/index'],
83 'options' => ['class'=>\Yii::$app->user->can('banner') || \Yii::$app->user->can('slider') ? '' :'hide'], 84 'options' => ['class'=>\Yii::$app->user->can('banner') || \Yii::$app->user->can('slider') ? '' :'hide'],
84 'active' => preg_match('/^slider.*$/', $this->context->id) || preg_match('/^banner.*$/', $this->context->id) ? true : false, 85 'active' => preg_match('/^slider.*$/', $this->context->id) || preg_match('/^banner.*$/', $this->context->id) ? true : false,
85 - 'items' => [  
86 - [  
87 - 'label' => 'Слайдер',  
88 - 'url' => ['/slider/index'],  
89 - 'options' => ['class'=>\Yii::$app->user->can('slider') ? '' :'hide'],  
90 - ],  
91 - [  
92 - 'label' => 'Банер',  
93 - 'url' => ['/banner/index'],  
94 - 'options' => ['class'=>\Yii::$app->user->can('banner') ? '' :'hide'],  
95 - ],  
96 - ]  
97 ], 86 ],
98 [ 87 [
99 'label' => 'Текстовые страницы', 88 'label' => 'Текстовые страницы',
@@ -113,22 +102,22 @@ use yii\widgets\Menu; @@ -113,22 +102,22 @@ use yii\widgets\Menu;
113 ], 102 ],
114 [ 103 [
115 'label' => 'Категории блога', 104 'label' => 'Категории блога',
116 - 'url' => '/admin/blog-category/index' 105 + 'url' => ['/blog-category/index'],
117 ], 106 ],
118 ], 107 ],
119 ], 108 ],
120 [ 109 [
121 'label' => 'События', 110 'label' => 'События',
122 - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-pencil"></i> <span>{label}</span></a>', 111 + 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-calendar"></i> <span>{label}</span></a>',
123 'url' => ['/articles/index'], 112 'url' => ['/articles/index'],
124 'options' => ['class'=>\Yii::$app->user->can('articles') ? '' :'hide'], 113 'options' => ['class'=>\Yii::$app->user->can('articles') ? '' :'hide'],
125 ], 114 ],
126 - [  
127 - 'label' => 'Акции',  
128 - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-piggy-bank"></i> <span>{label}</span></a>',  
129 - 'url' => ['/event/index'],  
130 - 'options' => ['class'=>\Yii::$app->user->can('event') ? '' :'hide'],  
131 - ], 115 +// [
  116 +// 'label' => 'Акции',
  117 +// 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-piggy-bank"></i> <span>{label}</span></a>',
  118 +// 'url' => ['/event/index'],
  119 +// 'options' => ['class'=>\Yii::$app->user->can('event') ? '' :'hide'],
  120 +// ],
132 [ 121 [
133 'label' => 'SEO', 122 'label' => 'SEO',
134 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>', 123 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-search"></i> <span>{label}</span></a>',
@@ -148,36 +137,36 @@ use yii\widgets\Menu; @@ -148,36 +137,36 @@ use yii\widgets\Menu;
148 ] 137 ]
149 ], 138 ],
150 139
151 - [  
152 - 'label' => 'Фон',  
153 - 'url' => ['/bg/index'],  
154 - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-picture"></i> <span>{label}</span></a>',  
155 - 'options' => ['class'=>\Yii::$app->user->can('bg')? '' :'hide']  
156 - ],  
157 - [  
158 - 'label' => 'Подписка',  
159 - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-envelope"></i> <span>{label}</span></a>',  
160 - 'url' => ['/subscribe/index'],  
161 - 'options' => ['class'=>\Yii::$app->user->can('subscribe') ? '' :'hide'],  
162 - ],  
163 - [  
164 - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-user"></i> <span>{label}</span></a>',  
165 - 'label' => 'Пользователи',  
166 - 'url' => ['/customer/index'],  
167 - 'options' => ['class'=>\Yii::$app->user->can('customer') ? '' :'hide'],  
168 - ], 140 +// [
  141 +// 'label' => 'Фон',
  142 +// 'url' => ['/bg/index'],
  143 +// 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-picture"></i> <span>{label}</span></a>',
  144 +// 'options' => ['class'=>\Yii::$app->user->can('bg')? '' :'hide']
  145 +// ],
  146 +// [
  147 +// 'label' => 'Подписка',
  148 +// 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-envelope"></i> <span>{label}</span></a>',
  149 +// 'url' => ['/subscribe/index'],
  150 +// 'options' => ['class'=>\Yii::$app->user->can('subscribe') ? '' :'hide'],
  151 +// ],
  152 +// [
  153 +// 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-user"></i> <span>{label}</span></a>',
  154 +// 'label' => 'Пользователи',
  155 +// 'url' => ['/customer/index'],
  156 +// 'options' => ['class'=>\Yii::$app->user->can('customer') ? '' :'hide'],
  157 +// ],
169 [ 158 [
170 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-comment"></i> <span>{label}</span></a>', 159 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-comment"></i> <span>{label}</span></a>',
171 'label' => 'Комментарии', 160 'label' => 'Комментарии',
172 'url' => ['/artbox-comments'], 161 'url' => ['/artbox-comments'],
173 'options' => ['class'=>\Yii::$app->user->can('artbox-comments') ? '' :'hide'], 162 'options' => ['class'=>\Yii::$app->user->can('artbox-comments') ? '' :'hide'],
174 ], 163 ],
175 - [  
176 - 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-comment"></i> <span>{label}</span></a>',  
177 - 'label' => 'Обратная связь',  
178 - 'url' => ['/feedback'],  
179 - 'options' => ['class'=>\Yii::$app->user->can('feedback') ? '' :'hide'],  
180 - ], 164 +// [
  165 +// 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-comment"></i> <span>{label}</span></a>',
  166 +// 'label' => 'Обратная связь',
  167 +// 'url' => ['/feedback'],
  168 +// 'options' => ['class'=>\Yii::$app->user->can('feedback') ? '' :'hide'],
  169 +// ],
181 [ 170 [
182 'label' => 'Настройка ролей', 171 'label' => 'Настройка ролей',
183 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-cog"></i> <span>{label}</span></a>', 172 'template'=>'<a href="{url}"> <i class="glyphicon glyphicon-cog"></i> <span>{label}</span></a>',
backend/views/page/_form.php
@@ -16,6 +16,12 @@ use mihaildev\elfinder\ElFinder; @@ -16,6 +16,12 @@ use mihaildev\elfinder\ElFinder;
16 <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?> 16 <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
17 17
18 <?= $form->field($model, 'translit')->textInput(['maxlength' => true]) ?> 18 <?= $form->field($model, 'translit')->textInput(['maxlength' => true]) ?>
  19 +
  20 + <?= $form->field($model, 'in_menu')->checkbox() ?>
  21 +
  22 + <?= $form->field($model, 'in_top_menu')->checkbox() ?>
  23 +
  24 + <?= $form->field($model, 'sort_order')->textInput() ?>
19 25
20 <?= $form->field($model, 'body')->widget(CKEditor::className(), 26 <?= $form->field($model, 'body')->widget(CKEditor::className(),
21 [ 27 [
@@ -37,12 +43,6 @@ use mihaildev\elfinder\ElFinder; @@ -37,12 +43,6 @@ use mihaildev\elfinder\ElFinder;
37 <?= $form->field($model, 'seo_text')->textarea(['rows' => 6]) ?> 43 <?= $form->field($model, 'seo_text')->textarea(['rows' => 6]) ?>
38 44
39 <?= $form->field($model, 'h1')->textInput(['maxlength' => true]) ?> 45 <?= $form->field($model, 'h1')->textInput(['maxlength' => true]) ?>
40 -  
41 - <?= $form->field($model, 'in_menu')->checkbox() ?>  
42 -  
43 - <?= $form->field($model, 'in_top_menu')->checkbox() ?>  
44 -  
45 - <?= $form->field($model, 'sort_order')->textInput() ?>  
46 46
47 <div class="form-group"> 47 <div class="form-group">
48 <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> 48 <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
common/behaviors/DefaultVariantBehavior.php 100644 → 100755
common/behaviors/ManyToManyBehavior.php 100644 → 100755
common/models/Articles.php
@@ -81,11 +81,11 @@ class Articles extends \yii\db\ActiveRecord @@ -81,11 +81,11 @@ class Articles extends \yii\db\ActiveRecord
81 { 81 {
82 return [ 82 return [
83 'id' => 'ID', 83 'id' => 'ID',
84 - 'date' => 'Date',  
85 - 'date_end' => 'Date end',  
86 - 'title' => 'Title',  
87 - 'body' => 'Body',  
88 - 'body_preview' => 'Body preview', 84 + 'date' => 'Дата (Дата начала)',
  85 + 'date_end' => '(Дата окончания)',
  86 + 'title' => 'Название',
  87 + 'body' => 'Текст',
  88 + 'body_preview' => 'Текст (предпросмотр)',
89 'image' => 'Image', 89 'image' => 'Image',
90 'imageUrl' => Yii::t('app', 'Image'), 90 'imageUrl' => Yii::t('app', 'Image'),
91 'translit' => 'Translit', 91 'translit' => 'Translit',
@@ -94,6 +94,7 @@ class Articles extends \yii\db\ActiveRecord @@ -94,6 +94,7 @@ class Articles extends \yii\db\ActiveRecord
94 'meta_description' => 'Meta Description', 94 'meta_description' => 'Meta Description',
95 'seo_text' => 'Seo Text', 95 'seo_text' => 'Seo Text',
96 'h1' => 'H1', 96 'h1' => 'H1',
  97 + 'imageUpload' => 'Картинка',
97 ]; 98 ];
98 } 99 }
99 100
common/models/Blog.php
@@ -141,11 +141,11 @@ @@ -141,11 +141,11 @@
141 { 141 {
142 return [ 142 return [
143 'id' => 'ID', 143 'id' => 'ID',
144 - 'date' => 'Date', 144 + 'date' => 'Дата публикации',
145 'date_end' => 'Date end', 145 'date_end' => 'Date end',
146 - 'title' => 'Title',  
147 - 'body' => 'Body',  
148 - 'body_preview' => 'Body preview', 146 + 'title' => 'Название',
  147 + 'body' => 'Текст',
  148 + 'body_preview' => 'Текс (предпросмотр)',
149 'image' => 'Image', 149 'image' => 'Image',
150 'imageUrl' => Yii::t('app', 'Image'), 150 'imageUrl' => Yii::t('app', 'Image'),
151 'translit' => 'Translit', 151 'translit' => 'Translit',
@@ -154,6 +154,8 @@ @@ -154,6 +154,8 @@
154 'meta_description' => 'Meta Description', 154 'meta_description' => 'Meta Description',
155 'seo_text' => 'Seo Text', 155 'seo_text' => 'Seo Text',
156 'h1' => 'H1', 156 'h1' => 'H1',
  157 + 'imageUpload' => 'Картинка',
  158 + 'categoryItems' => 'Категории',
157 ]; 159 ];
158 } 160 }
159 161
common/models/BlogCategory.php 100644 → 100755
@@ -25,7 +25,18 @@ @@ -25,7 +25,18 @@
25 ], 25 ],
26 ]; 26 ];
27 } 27 }
28 - 28 +
  29 + /**
  30 + * @inheritdoc
  31 + * @return array
  32 + */
  33 + public function attributeLabels()
  34 + {
  35 + return [
  36 + 'name' => 'Название категории',
  37 + ];
  38 + }
  39 +
29 public static function tableName() 40 public static function tableName()
30 { 41 {
31 return 'blog_category'; 42 return 'blog_category';
common/models/BlogCategorySearch.php 100644 → 100755
common/models/BlogToCategory.php 100644 → 100755
common/models/Comments.php 100644 → 100755
common/models/Page.php
@@ -100,16 +100,16 @@ @@ -100,16 +100,16 @@
100 return [ 100 return [
101 'id' => 'ID', 101 'id' => 'ID',
102 'translit' => 'Translit', 102 'translit' => 'Translit',
103 - 'title' => 'Title',  
104 - 'body' => 'Body', 103 + 'title' => 'Название',
  104 + 'body' => 'Текст',
105 'meta_title' => 'Meta Title', 105 'meta_title' => 'Meta Title',
106 'meta_keywords' => 'Meta Keywords', 106 'meta_keywords' => 'Meta Keywords',
107 'meta_description' => 'Meta Description', 107 'meta_description' => 'Meta Description',
108 'seo_text' => 'Seo Text', 108 'seo_text' => 'Seo Text',
109 'h1' => 'H1', 109 'h1' => 'H1',
110 - 'in_menu' => 'Show in main menu',  
111 - 'in_top_menu' => 'Show in top menu',  
112 - 'sort_order' => 'Sort order', 110 + 'in_menu' => 'Отображать в главном меню',
  111 + 'in_top_menu' => 'Отображать в верхнем меню',
  112 + 'sort_order' => 'Порядок сортировки',
113 ]; 113 ];
114 } 114 }
115 } 115 }
common/modules/comment/views/manage/index.php
@@ -54,25 +54,25 @@ @@ -54,25 +54,25 @@
54 return $statuses[$model->status]; 54 return $statuses[$model->status];
55 } 55 }
56 ], 56 ],
57 - [  
58 - 'attribute' => 'rating_value',  
59 - 'label' => $searchModel->getAttributeLabel('rating_value'),  
60 - 'value' => function($model) {  
61 - if(!empty($model->rating)) {  
62 - return $model->rating->value;  
63 - }  
64 - return NULL;  
65 - }  
66 - ],  
67 - 'entity',  
68 - 'entity_id',  
69 - [  
70 - 'attribute' => 'children_count',  
71 - 'label' => $searchModel->getAttributeLabel('children_count'),  
72 - 'value' => function($model) {  
73 - return count($model->children);  
74 - }  
75 - ], 57 +// [
  58 +// 'attribute' => 'rating_value',
  59 +// 'label' => $searchModel->getAttributeLabel('rating_value'),
  60 +// 'value' => function($model) {
  61 +// if(!empty($model->rating)) {
  62 +// return $model->rating->value;
  63 +// }
  64 +// return NULL;
  65 +// }
  66 +// ],
  67 +// 'entity',
  68 +// 'entity_id',
  69 +// [
  70 +// 'attribute' => 'children_count',
  71 +// 'label' => $searchModel->getAttributeLabel('children_count'),
  72 +// 'value' => function($model) {
  73 +// return count($model->children);
  74 +// }
  75 +// ],
76 ], 76 ],
77 ]); 77 ]);
78 Pjax::end(); 78 Pjax::end();
79 \ No newline at end of file 79 \ No newline at end of file
common/modules/product/models/Category.php
@@ -109,15 +109,18 @@ class Category extends \yii\db\ActiveRecord @@ -109,15 +109,18 @@ class Category extends \yii\db\ActiveRecord
109 'h1' => Yii::t('product', 'h1'), 109 'h1' => Yii::t('product', 'h1'),
110 'seo_text' => Yii::t('product', 'Seo Text'), 110 'seo_text' => Yii::t('product', 'Seo Text'),
111 'product_unit_id' => Yii::t('product', 'Product Unit ID'), 111 'product_unit_id' => Yii::t('product', 'Product Unit ID'),
112 - 'alias' => Yii::t('product', 'Alias'), 112 + 'alias' => 'url',
113 'name' => Yii::t('product', 'Name'), 113 'name' => Yii::t('product', 'Name'),
114 'remote_id' => Yii::t('product', 'Remote ID'), 114 'remote_id' => Yii::t('product', 'Remote ID'),
115 'first_text' => 'Заголовок', 115 'first_text' => 'Заголовок',
116 'second_text' => 'Подзаголовок', 116 'second_text' => 'Подзаголовок',
117 - 'new_collection' => 'Новая коллекция', 117 + 'new_collection' => 'Новая коллекция (для коллекций)',
118 'brand_image' => 'Картинка бренда', 118 'brand_image' => 'Картинка бренда',
119 - 'stock_program' => 'Складская программа',  
120 - 'on_order' => 'Под заказ', 119 + 'stock_program' => 'Складская программа (для брендов)',
  120 + 'on_order' => 'Под заказ (для брендов)',
  121 + 'imageUpload' => 'Картинка',
  122 + 'brandImageUpload' => 'Картинка (бренда)'
  123 +
121 ]; 124 ];
122 } 125 }
123 126
common/modules/product/models/Product.php
@@ -37,6 +37,8 @@ @@ -37,6 +37,8 @@
37 * @property TaxOption[] $options 37 * @property TaxOption[] $options
38 * @property ProductVariant[] $variants 38 * @property ProductVariant[] $variants
39 * @property string $alias 39 * @property string $alias
  40 + * @property string $size
  41 + * @property string $material
40 */ 42 */
41 class Product extends \yii\db\ActiveRecord 43 class Product extends \yii\db\ActiveRecord
42 { 44 {
@@ -92,7 +94,11 @@ @@ -92,7 +94,11 @@
92 'max' => 150, 94 'max' => 150,
93 ], 95 ],
94 [ 96 [
95 - [ 'alias' ], 97 + [
  98 + 'alias',
  99 + 'size',
  100 + 'material',
  101 + ],
96 'string', 102 'string',
97 'max' => 250, 103 'max' => 250,
98 ], 104 ],
@@ -138,12 +144,15 @@ @@ -138,12 +144,15 @@
138 // relation behavior field 144 // relation behavior field
139 'image' => Yii::t('product', 'Image'), 145 'image' => Yii::t('product', 'Image'),
140 'images' => Yii::t('product', 'Images'), 146 'images' => Yii::t('product', 'Images'),
141 - 'description' => Yii::t('product', 'Description'), 147 + 'description' => 'Описание',
142 'video' => Yii::t('product', 'Video embeded'), 148 'video' => Yii::t('product', 'Video embeded'),
143 'variants' => Yii::t('product', 'Variants'), 149 'variants' => Yii::t('product', 'Variants'),
144 'is_top' => Yii::t('product', 'Is top'), 150 'is_top' => Yii::t('product', 'Is top'),
145 'is_new' => Yii::t('product', 'Is new'), 151 'is_new' => Yii::t('product', 'Is new'),
146 'akciya' => Yii::t('product', 'Is promo'), 152 'akciya' => Yii::t('product', 'Is promo'),
  153 + 'imagesUpload'=> 'Картинки',
  154 + 'size' => 'Размер',
  155 + 'material' => 'Состав',
147 ]; 156 ];
148 } 157 }
149 158
common/modules/product/views/manage/_form.php
@@ -23,20 +23,14 @@ @@ -23,20 +23,14 @@
23 ]); ?> 23 ]); ?>
24 24
25 <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> 25 <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
26 -  
27 - <?= $form->field($model, 'is_top')->checkbox(['label' => 'ТОП']) ?>  
28 - <?= $form->field($model, 'is_new')->checkbox(['label' => 'Новинка']) ?> 26 +
29 <?= $form->field($model, 'akciya')->checkbox(['label' => 'Акционный']) ?> 27 <?= $form->field($model, 'akciya')->checkbox(['label' => 'Акционный']) ?>
30 - 28 +
  29 + <?= $form->field($model, 'size')->textInput() ?>
  30 +
  31 + <?= $form->field($model, 'material')->textInput() ?>
  32 +
31 <?= $form->field($model, 'description')->widget(\mihaildev\ckeditor\CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ], ]); ?> 33 <?= $form->field($model, 'description')->widget(\mihaildev\ckeditor\CKEditor::className(),['editorOptions' => [ 'preset' => 'full', 'inline' => false, ], ]); ?>
32 - <?= $form->field($model, 'video')->textarea(); ?>  
33 -  
34 - <?= $form->field($model, 'brand_id')->dropDownList(  
35 - ArrayHelper::map(ProductHelper::getBrands()->all(), 'brand_id', 'name'),  
36 - [  
37 - 'prompt' => Yii::t('product', 'Select brand')  
38 - ]  
39 - ) ?>  
40 34
41 <?= $form->field($model, 'categories')->widget(Select2::className(), [ 35 <?= $form->field($model, 'categories')->widget(Select2::className(), [
42 'data' => ArtboxTreeHelper::treeMap(ProductHelper::getCategories(), 'category_id', 'name'), 36 'data' => ArtboxTreeHelper::treeMap(ProductHelper::getCategories(), 'category_id', 'name'),
common/modules/product/views/manage/index.php
@@ -28,25 +28,25 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title; @@ -28,25 +28,25 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title;
28 'columns' => [ 28 'columns' => [
29 ['class' => 'yii\grid\SerialColumn'], 29 ['class' => 'yii\grid\SerialColumn'],
30 'name', 30 'name',
31 - [  
32 - 'label' => Yii::t('product', 'Brand'),  
33 - 'attribute' => 'brand_name',  
34 - 'value' => 'brand.name',  
35 - 'format' => 'raw',  
36 - 'filter' => Select2::widget([  
37 - 'model' => $searchModel,  
38 - 'attribute' => 'brand_id',  
39 - 'data' => ArrayHelper::map(ProductHelper::getBrands()->all(), 'brand_id', 'name'),  
40 - 'language' => 'ru',  
41 - 'options' => [  
42 - 'placeholder' => Yii::t('product', 'Select brand'),  
43 - 'multiple' => false,  
44 - ],  
45 - 'pluginOptions' => [  
46 - 'allowClear' => true  
47 - ],  
48 - ])  
49 - ], 31 +// [
  32 +// 'label' => Yii::t('product', 'Brand'),
  33 +// 'attribute' => 'brand_name',
  34 +// 'value' => 'brand.name',
  35 +// 'format' => 'raw',
  36 +// 'filter' => Select2::widget([
  37 +// 'model' => $searchModel,
  38 +// 'attribute' => 'brand_id',
  39 +// 'data' => ArrayHelper::map(ProductHelper::getBrands()->all(), 'brand_id', 'name'),
  40 +// 'language' => 'ru',
  41 +// 'options' => [
  42 +// 'placeholder' => Yii::t('product', 'Select brand'),
  43 +// 'multiple' => false,
  44 +// ],
  45 +// 'pluginOptions' => [
  46 +// 'allowClear' => true
  47 +// ],
  48 +// ])
  49 +// ],
50 [ 50 [
51 'label' => Yii::t('product', 'Category'), 51 'label' => Yii::t('product', 'Category'),
52 'attribute' => 'category_name', 52 'attribute' => 'category_name',
@@ -78,7 +78,7 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title; @@ -78,7 +78,7 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title;
78 'value' => 'variant.sku', 78 'value' => 'variant.sku',
79 ], 79 ],
80 'variant.price', 80 'variant.price',
81 - 'variant.price_old', 81 +// 'variant.price_old',
82 [ 82 [
83 'label' => Yii::t('product', 'Stock'), 83 'label' => Yii::t('product', 'Stock'),
84 'attribute' => 'variant_stock', 84 'attribute' => 'variant_stock',
@@ -86,21 +86,21 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title; @@ -86,21 +86,21 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title;
86 ], 86 ],
87 [ 87 [
88 'class' => 'yii\grid\ActionColumn', 88 'class' => 'yii\grid\ActionColumn',
89 - 'template' => '{items} {view} |{is_top} {is_new} {akciya} | {update} {delete}', 89 + 'template' => '{items} {view} {akciya} {update} {delete}',
90 'buttons' => [ 90 'buttons' => [
91 - 'is_top' => function ($url, $model) {  
92 - return Html::a('<span class="glyphicon glyphicon-star' . ($model->is_top ? '' : '-empty') . '"></span>', $url, [  
93 - 'title' => Yii::t('product', ($model->is_top ? 'Set not is top' : 'Set is top')),  
94 - ]);  
95 - },  
96 - 'is_new' => function ($url, $model) {  
97 - return Html::a('<span class="glyphicon glyphicon-heart' . ($model->is_new ? '' : '-empty') . '"></span>', $url, [  
98 - 'title' => Yii::t('product', ($model->is_new ? 'Set not is new' : 'Set is new')),  
99 - ]);  
100 - }, 91 +// 'is_top' => function ($url, $model) {
  92 +// return Html::a('<span class="glyphicon glyphicon-star' . ($model->is_top ? '' : '-empty') . '"></span>', $url, [
  93 +// 'title' => Yii::t('product', ($model->is_top ? 'Set not is top' : 'Set is top')),
  94 +// ]);
  95 +// },
  96 +// 'is_new' => function ($url, $model) {
  97 +// return Html::a('<span class="glyphicon glyphicon-heart' . ($model->is_new ? '' : '-empty') . '"></span>', $url, [
  98 +// 'title' => Yii::t('product', ($model->is_new ? 'Set not is new' : 'Set is new')),
  99 +// ]);
  100 +// },
101 'akciya' => function ($url, $model) { 101 'akciya' => function ($url, $model) {
102 - return Html::a('<span class="glyphicon glyphicon-tag' . ($model->akciya ? 's' : '') . '"></span>', $url, [  
103 - 'title' => Yii::t('product', ($model->akciya ? 'Set not is promotion' : 'Set is promotion')), 102 + return Html::a('<span class="glyphicon glyphicon-star' . ($model->akciya ? '' : '-empty') . '"></span>', $url, [
  103 + 'title' => Yii::t('product', ($model->akciya ? 'Отметить как не акционный' : 'Отметить как акционный')),
104 ]); 104 ]);
105 }, 105 },
106 'items' => function ($url, $model) { 106 'items' => function ($url, $model) {
console/migrations/m160928_104309_add_is_default_column_to_stock_table.php 100644 → 100755
console/migrations/m160928_141017_add_main_page_column_to_slider.php 100644 → 100755
console/migrations/m160928_151947_baccara_custom_category_columns.php 100644 → 100755
console/migrations/m160929_141228_columns_for_page_table.php 100644 → 100755
console/migrations/m160930_082338_add_categories_to_blog.php 100644 → 100755
console/migrations/m161007_134913_custom_baccara_fields.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\db\Migration;
  4 +
  5 +class m161007_134913_custom_baccara_fields extends Migration
  6 +{
  7 + public function up()
  8 + {
  9 + $this->addColumn('product', 'size', $this->string(255));
  10 + $this->addColumn('product', 'material', $this->string(255));
  11 + }
  12 +
  13 + public function down()
  14 + {
  15 + $this->dropColumn('product', 'material');
  16 + $this->dropColumn('product', 'size');
  17 + }
  18 +}
frontend/controllers/CommentsController.php 100644 → 100755
frontend/controllers/DiscountController.php 100644 → 100755
frontend/views/catalog/view.php
@@ -58,8 +58,8 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title; @@ -58,8 +58,8 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title;
58 58
59 <ul> 59 <ul>
60 <li><span>Артикул:</span> <?php echo $variant->sku; ?></li> 60 <li><span>Артикул:</span> <?php echo $variant->sku; ?></li>
61 - <li><span>Размер:</span> 384 x 300 см</li>  
62 - <li><span>Состав:</span> 100% шелк</li> 61 + <li><span>Размер:</span> <?php echo $product->size; ?></li>
  62 + <li><span>Состав:</span> <?php echo $product->material; ?></li>
63 </ul> 63 </ul>
64 </div> 64 </div>
65 <div style="clear:both;"></div> 65 <div style="clear:both;"></div>
frontend/views/comments/index.php 100644 → 100755
frontend/views/discount/discount.php 100644 → 100755
frontend/views/discount/empty.php 100644 → 100755
frontend/views/product/view.php
@@ -58,8 +58,8 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title; @@ -58,8 +58,8 @@ $this-&gt;params[&#39;breadcrumbs&#39;][] = $this-&gt;title;
58 58
59 <ul> 59 <ul>
60 <li><span>Артикул:</span> <?php echo $variant->sku; ?></li> 60 <li><span>Артикул:</span> <?php echo $variant->sku; ?></li>
61 - <li><span>Размер:</span> 384 x 300 см</li>  
62 - <li><span>Состав:</span> 100% шелк</li> 61 + <li><span>Размер:</span> <?php echo $product->size; ?></li>
  62 + <li><span>Состав:</span> <?php echo $product->material; ?></li>
63 </ul> 63 </ul>
64 </div> 64 </div>
65 <div style="clear:both;"></div> 65 <div style="clear:both;"></div>
frontend/web/css/style.css 100644 → 100755
frontend/web/images/arrow_down_bold.png 100644 → 100755

53.3 KB | W: | H:

53.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/images/close.png 100644 → 100755

53.5 KB | W: | H:

53.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/web/images/close_hover.png 100644 → 100755

53.6 KB | W: | H:

53.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
frontend/widgets/SliderWidget.php 100644 → 100755
frontend/widgets/views/_slider_view.php 100644 → 100755
source/ProductStock.php 100644 → 100755
source/Stock.php 100644 → 100755
source/VariantController.php 100644 → 100755
source/actions.html 100644 → 100755