Commit 6c2a03b9546cd7f46586241406c2360d910d8d62
Merge remote-tracking branch 'origin/master'
Showing
4 changed files
with
36 additions
and
4 deletions
Show diff stats
frontend/controllers/SiteController.php
@@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
5 | use artbox\catalog\models\Brand; | 5 | use artbox\catalog\models\Brand; |
6 | use artbox\catalog\models\Category; | 6 | use artbox\catalog\models\Category; |
7 | use artbox\catalog\models\Product; | 7 | use artbox\catalog\models\Product; |
8 | + use artbox\core\models\DummyAlias; | ||
8 | use artbox\core\models\Feedback; | 9 | use artbox\core\models\Feedback; |
9 | use artbox\weblog\models\Article; | 10 | use artbox\weblog\models\Article; |
10 | use common\models\LoginForm; | 11 | use common\models\LoginForm; |
@@ -59,6 +60,17 @@ | @@ -59,6 +60,17 @@ | ||
59 | */ | 60 | */ |
60 | public function actionIndex() | 61 | public function actionIndex() |
61 | { | 62 | { |
63 | + /** | ||
64 | + * @var \artbox\core\components\SeoComponent $seo | ||
65 | + */ | ||
66 | + $seo = \Yii::$app->get('seo'); | ||
67 | + $seo->setAlias( | ||
68 | + new DummyAlias( | ||
69 | + [ | ||
70 | + 'title' => \Yii::t('app', 'Главная страница'), | ||
71 | + ] | ||
72 | + ) | ||
73 | + ); | ||
62 | $categories = Category::find() | 74 | $categories = Category::find() |
63 | ->with('categories.lang', 'lang') | 75 | ->with('categories.lang', 'lang') |
64 | ->where([ 'level' => 0 ]) | 76 | ->where([ 'level' => 0 ]) |
frontend/models/Order.php
@@ -5,7 +5,8 @@ | @@ -5,7 +5,8 @@ | ||
5 | use artbox\catalog\models\Variant; | 5 | use artbox\catalog\models\Variant; |
6 | use artbox\order\models\Delivery; | 6 | use artbox\order\models\Delivery; |
7 | use artbox\order\models\Payment; | 7 | use artbox\order\models\Payment; |
8 | - | 8 | + use yii\behaviors\BlameableBehavior; |
9 | + | ||
9 | class Order extends \artbox\order\models\Order | 10 | class Order extends \artbox\order\models\Order |
10 | { | 11 | { |
11 | public $variantId; | 12 | public $variantId; |
@@ -47,6 +48,17 @@ | @@ -47,6 +48,17 @@ | ||
47 | ); | 48 | ); |
48 | } | 49 | } |
49 | 50 | ||
51 | + public function behaviors() | ||
52 | + { | ||
53 | + return [ | ||
54 | + [ | ||
55 | + 'class' => BlameableBehavior::className(), | ||
56 | + 'createdByAttribute' => 'user_id', | ||
57 | + 'updatedByAttribute' => false, | ||
58 | + ], | ||
59 | + ]; | ||
60 | + } | ||
61 | + | ||
50 | /** | 62 | /** |
51 | * @inheritdoc | 63 | * @inheritdoc |
52 | */ | 64 | */ |
frontend/views/layouts/main.php
@@ -129,6 +129,12 @@ _________________________________________________________ --> | @@ -129,6 +129,12 @@ _________________________________________________________ --> | ||
129 | ] | 129 | ] |
130 | ); | 130 | ); |
131 | } | 131 | } |
132 | + echo Html::a( | ||
133 | + \Yii::t('app', 'Контакты'), | ||
134 | + [ | ||
135 | + 'site/contact', | ||
136 | + ] | ||
137 | + ); | ||
132 | ?> | 138 | ?> |
133 | </div> | 139 | </div> |
134 | <div class="col-xs-6 right-top-nav"> | 140 | <div class="col-xs-6 right-top-nav"> |
@@ -179,7 +185,7 @@ _________________________________________________________ --> | @@ -179,7 +185,7 @@ _________________________________________________________ --> | ||
179 | 'alt' => 'logo', | 185 | 'alt' => 'logo', |
180 | ] | 186 | ] |
181 | ), | 187 | ), |
182 | - [ '/site/index' ], | 188 | + '/ru/', |
183 | [ | 189 | [ |
184 | 'class' => 'navbar-brand home', | 190 | 'class' => 'navbar-brand home', |
185 | ] | 191 | ] |
@@ -381,6 +387,8 @@ _________________________________________________________ --> | @@ -381,6 +387,8 @@ _________________________________________________________ --> | ||
381 | 'placeholder' => $loginForm->getAttributeLabel('password'), | 387 | 'placeholder' => $loginForm->getAttributeLabel('password'), |
382 | ] | 388 | ] |
383 | ); | 389 | ); |
390 | + echo $login->field($loginForm, 'rememberMe') | ||
391 | + ->checkbox(); | ||
384 | echo Html::submitButton( | 392 | echo Html::submitButton( |
385 | \Yii::t('app', 'Login'), | 393 | \Yii::t('app', 'Login'), |
386 | [ | 394 | [ |
@@ -455,7 +463,7 @@ _________________________________________________________ --> | @@ -455,7 +463,7 @@ _________________________________________________________ --> | ||
455 | ?> | 463 | ?> |
456 | <div class="modal fade" id="callback-modal" tabindex="-1" role="dialog" aria-labelledby="Login" aria-hidden="true"> | 464 | <div class="modal fade" id="callback-modal" tabindex="-1" role="dialog" aria-labelledby="Login" aria-hidden="true"> |
457 | <div class="modal-dialog modal-sm"> | 465 | <div class="modal-dialog modal-sm"> |
458 | - | 466 | + |
459 | <div class="modal-content"> | 467 | <div class="modal-content"> |
460 | <div class="modal-header"> | 468 | <div class="modal-header"> |
461 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | 469 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
frontend/views/site/index.php
@@ -152,7 +152,7 @@ _________________________________________________________ --> | @@ -152,7 +152,7 @@ _________________________________________________________ --> | ||
152 | if (!empty($topItems)) { | 152 | if (!empty($topItems)) { |
153 | ?> | 153 | ?> |
154 | <div class="heading text-center"> | 154 | <div class="heading text-center"> |
155 | - <h2><?php echo \Yii::t('app', 'Акции'); ?></h2> | 155 | + <h2><?php echo \Yii::t('app', 'Топ'); ?></h2> |
156 | </div> | 156 | </div> |
157 | <div class="product-carousel"> | 157 | <div class="product-carousel"> |
158 | <div class="homepage owl-carousel"> | 158 | <div class="homepage owl-carousel"> |