diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 87a4445..6918873 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -5,6 +5,7 @@ use artbox\catalog\models\Brand; use artbox\catalog\models\Category; use artbox\catalog\models\Product; + use artbox\core\models\DummyAlias; use artbox\core\models\Feedback; use artbox\weblog\models\Article; use common\models\LoginForm; @@ -59,6 +60,17 @@ */ public function actionIndex() { + /** + * @var \artbox\core\components\SeoComponent $seo + */ + $seo = \Yii::$app->get('seo'); + $seo->setAlias( + new DummyAlias( + [ + 'title' => \Yii::t('app', 'Главная страница'), + ] + ) + ); $categories = Category::find() ->with('categories.lang', 'lang') ->where([ 'level' => 0 ]) diff --git a/frontend/models/Order.php b/frontend/models/Order.php index f555476..e0333cc 100644 --- a/frontend/models/Order.php +++ b/frontend/models/Order.php @@ -5,7 +5,8 @@ use artbox\catalog\models\Variant; use artbox\order\models\Delivery; use artbox\order\models\Payment; - + use yii\behaviors\BlameableBehavior; + class Order extends \artbox\order\models\Order { public $variantId; @@ -47,6 +48,17 @@ ); } + public function behaviors() + { + return [ + [ + 'class' => BlameableBehavior::className(), + 'createdByAttribute' => 'user_id', + 'updatedByAttribute' => false, + ], + ]; + } + /** * @inheritdoc */ diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index d113510..d23f2ed 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -129,6 +129,12 @@ _________________________________________________________ --> ] ); } + echo Html::a( + \Yii::t('app', 'Контакты'), + [ + 'site/contact', + ] + ); ?>
@@ -179,7 +185,7 @@ _________________________________________________________ --> 'alt' => 'logo', ] ), - [ '/site/index' ], + '/ru/', [ 'class' => 'navbar-brand home', ] @@ -381,6 +387,8 @@ _________________________________________________________ --> 'placeholder' => $loginForm->getAttributeLabel('password'), ] ); + echo $login->field($loginForm, 'rememberMe') + ->checkbox(); echo Html::submitButton( \Yii::t('app', 'Login'), [ @@ -455,7 +463,7 @@ _________________________________________________________ --> ?>