diff --git a/frontend/config/main.php b/frontend/config/main.php
index 98d0a06..259f3de 100755
--- a/frontend/config/main.php
+++ b/frontend/config/main.php
@@ -8,6 +8,7 @@ $params = array_merge(
return [
'id' => 'app-frontend',
+ 'name'=>'Лінія Світла',
'basePath' => dirname(__DIR__),
'bootstrap' => [
@@ -18,7 +19,6 @@ return [
],
'components' => [
-
'authManager' => [
'class' => 'yii\rbac\DbManager',
],
diff --git a/frontend/controllers/CatalogController.php b/frontend/controllers/CatalogController.php
index b5f727f..67a720c 100755
--- a/frontend/controllers/CatalogController.php
+++ b/frontend/controllers/CatalogController.php
@@ -118,7 +118,7 @@ class CatalogController extends \yii\web\Controller
$groups = $category->getActiveFilters()->all();
$groups = ArrayHelper::index($groups, null, 'name');
- $priceLimits = $productModel->priceLimits($category, $params);
+ //$priceLimits = $productModel->priceLimits($category, $params);
/*
* Greedy search for comments and rating
@@ -142,7 +142,7 @@ class CatalogController extends \yii\web\Controller
'productModel' => $productModel,
'productProvider' => $productProvider,
'groups' => $groups,
- 'priceLimits' => $priceLimits,
+ //'priceLimits' => $priceLimits,
]);
}
diff --git a/frontend/controllers/OrderController.php b/frontend/controllers/OrderController.php
index b6c2702..8096840 100755
--- a/frontend/controllers/OrderController.php
+++ b/frontend/controllers/OrderController.php
@@ -47,7 +47,7 @@
/**
* Проверяем товар на наличие
*/
- if(!$product->stock > 0 || !$product->price > 0) {
+ if( !$product->price > 0) {
/**
* Добавляем сообщение об ошибке
*/
@@ -139,7 +139,7 @@
throw new InvalidParamException('Не указан товар');
}
if(!empty( $product_variant ) && $orders->load($request->post()) && $orders->save()) {
- if($product_variant->stock <= 0 || $product_variant->price <= 0) {
+ if( $product_variant->price <= 0) {
$orders->delete();
return [
'error' => 'К сожалению товара ' . $product_variant->name . ' нет в наличии',
@@ -194,7 +194,7 @@
$order_products = [];
foreach($data as $product_variant_id => $item) {
$product_variant = ProductVariant::findOne($product_variant_id);
- if(!empty($product_variant) && $product_variant->stock > 0 && $product_variant->price > 0) {
+ if(!empty($product_variant) && $product_variant->price > 0) {
$product_variants[$product_variant_id] = $product_variant;
$order_products[$product_variant_id] = new OrdersProducts([
'product_name' => $product_variant->product->name,
diff --git a/frontend/views/articles/index.php b/frontend/views/articles/index.php
index 8aafaba..632168b 100755
--- a/frontend/views/articles/index.php
+++ b/frontend/views/articles/index.php
@@ -1,6 +1,7 @@
title = 'Статьи';
-
+ $this->params[ 'seo' ][ Seo::H1] = $this->title ;
+ $this->params[ 'seo' ][ Seo::TITLE] = $this->title;
$this->params['breadcrumbs'][] = $this->title;
diff --git a/frontend/views/cabinet/index.php b/frontend/views/cabinet/index.php
index 0cd910e..829a4f8 100755
--- a/frontend/views/cabinet/index.php
+++ b/frontend/views/cabinet/index.php
@@ -1,7 +1,10 @@
title = 'Moй кабинет';
$this->params['breadcrumbs'][] = $this->title;
-
+$this->params[ 'seo' ][ Seo::H1] = $this->title ;
+$this->params[ 'seo' ][ Seo::TITLE] = $this->title;
?>
diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php
index 098bc4f..bd4350b 100755
--- a/frontend/views/catalog/product.php
+++ b/frontend/views/catalog/product.php
@@ -17,7 +17,7 @@ FlipclockAsset::register($this);
$this->params[ 'seo' ][ 'fields' ][ 'name' ] = $product->name;
$this->params[ 'seo' ][ 'h1' ] = !empty( Seo::widget([ 'row' => 'h1' ]) ) ? Seo::widget([ 'row' => 'h1' ]) : $product->name;
$this->title = $product->name;
-
+
$this->params[ 'breadcrumbs' ][] = [
'label' => $category->name,
'url' => [
@@ -25,6 +25,11 @@ FlipclockAsset::register($this);
'category' => $category,
],
];
+
+ $this->params[ 'breadcrumbs' ][] = [
+ 'label' => $product->brand->name,
+ 'url' => ['catalog/category', 'category' => $category, 'filters' => ['brands' => [$product->brand->alias]]],
+ ];
$this->params[ 'breadcrumbs' ][] = $product->name . ' #' . $product->variant->sku;
?>
diff --git a/frontend/views/catalog/products.php b/frontend/views/catalog/products.php
index 840d05e..37bd651 100755
--- a/frontend/views/catalog/products.php
+++ b/frontend/views/catalog/products.php
@@ -134,18 +134,18 @@ use yii\helpers\Url;
- = ListView::widget([
- 'dataProvider' => $productProvider,
- 'itemView' => function ($model, $key, $index, $widget) use($category) {
- return $this->render('_product_item',[
- 'model' => $model,
- 'category' => $category
- ]);
- },
- 'layout' => "{items}
{pager}",
- ])
-
- ?>
+//= ListView::widget([
+// 'dataProvider' => $productProvider,
+// 'itemView' => function ($model, $key, $index, $widget) use($category) {
+// return $this->render('_product_item',[
+// 'model' => $model,
+// 'category' => $category
+// ]);
+// },
+// 'layout' => "{items}
{pager}",
+// ])
+//
+// ?>
diff --git a/frontend/views/event/index.php b/frontend/views/event/index.php
index d82c111..84ad617 100755
--- a/frontend/views/event/index.php
+++ b/frontend/views/event/index.php
@@ -6,11 +6,13 @@ use yii\widgets\LinkPager;
use yii\widgets\ListView;
-?>
-title = 'Акции';
-$this->registerMetaTag(['name' => 'description', 'content' => 'Акции']);
-$this->registerMetaTag(['name' => 'keywords', 'content' => 'Акции']);
+$this->params['seo']['title'] = $this->title;
+
+$this->params['seo']['h1'] = $this->title;
+
+
+
?>
diff --git a/frontend/views/event/show.php b/frontend/views/event/show.php
index a39585c..b8fac6b 100755
--- a/frontend/views/event/show.php
+++ b/frontend/views/event/show.php
@@ -8,7 +8,9 @@ FlipclockAsset::register($this);
?>
title = $model->name;
+$this->params['seo']['title'] = $this->title;
+$this->params['seo']['h1'] = $this->title;
?>
diff --git a/frontend/views/order/index.php b/frontend/views/order/index.php
index efe3bd5..899cb93 100755
--- a/frontend/views/order/index.php
+++ b/frontend/views/order/index.php
@@ -1,11 +1,14 @@
title = "Корзина";
+$this->params[ 'seo' ][ Seo::H1] = $this->title ;
+$this->params[ 'seo' ][ Seo::TITLE] = $this->title;
/**
* @var View $this
* @var ProductVariant[] $models
diff --git a/frontend/views/site/error.php b/frontend/views/site/error.php
index ded3170..c20bec5 100755
--- a/frontend/views/site/error.php
+++ b/frontend/views/site/error.php
@@ -1,5 +1,6 @@
title = 'Ошибка '.$code;
+
+$this->params[ 'seo' ][ Seo::TITLE] = $this->title = 'Ошибка '.$code;
+
?>