diff --git a/common/config/main.php b/common/config/main.php
index f8aac3d..2c8ebef 100755
--- a/common/config/main.php
+++ b/common/config/main.php
@@ -233,6 +233,12 @@
'height' => 221,
],
],
+ 'product_list_item' => [
+ 'resize' => [
+ 'width' => 308,
+ 'height' => 221,
+ ],
+ ],
]
],
'basket' => [
diff --git a/common/modules/product/models/Category.php b/common/modules/product/models/Category.php
index dc5dc39..29971d2 100755
--- a/common/modules/product/models/Category.php
+++ b/common/modules/product/models/Category.php
@@ -292,4 +292,13 @@ class Category extends \yii\db\ActiveRecord
'category_id' => 'parent_id',
]);
}
+
+ public function getGrandParent()
+ {
+ return $this->hasOne(Category::className(), [
+ 'category_id' => 'parent_id',
+ ])->viaTable('category', [
+ 'category_id' => 'parent_id',
+ ], function($query) { $query->from('category c2'); });
+ }
}
diff --git a/frontend/controllers/ProductController.php b/frontend/controllers/ProductController.php
index 3a6fc29..ba005a3 100755
--- a/frontend/controllers/ProductController.php
+++ b/frontend/controllers/ProductController.php
@@ -1,8 +1,10 @@
render('index');
+ $category = Category::find()
+ ->where([
+ 'category_id' => $id,
+ ])->one();
+ $query = Product::find()
+ ->joinWith(['categories.grandParent c3'])
+ ->with('variant')
+ ->where(['c3.category_id' => $id]);
+ $dataProvider = new ActiveDataProvider([
+ 'query' => $query,
+ 'pagination' => [
+ 'pageSize' => 15,
+ ],
+ ]);
+ return $this->render('index', [
+ 'dataProvider' => $dataProvider,
+ 'category' => $category,
+ ]);
}
/**
diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php
index f0c13f1..9ca4ea7 100755
--- a/frontend/views/layouts/main.php
+++ b/frontend/views/layouts/main.php
@@ -56,15 +56,15 @@ $brands = Category::find()
- Бренды
diff --git a/frontend/views/product/_product_list.php b/frontend/views/product/_product_list.php
new file mode 100644
index 0000000..61c1f72
--- /dev/null
+++ b/frontend/views/product/_product_list.php
@@ -0,0 +1,31 @@
+
+
+
diff --git a/frontend/views/product/index.php b/frontend/views/product/index.php
index 63f5fa0..2e0bad3 100644
--- a/frontend/views/product/index.php
+++ b/frontend/views/product/index.php
@@ -1,5 +1,18 @@
title = $category->first_text;
+$this->params['breadcrumbs'][] = $this->title;
+
?>
@@ -185,177 +198,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ $dataProvider,
+ 'itemView' => '_product_list',
+ 'layout' => '{items}{pager}',
+ ])?>
-
-
-
diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css
index a5bd257..a8f8f52 100644
--- a/frontend/web/css/style.css
+++ b/frontend/web/css/style.css
@@ -801,7 +801,7 @@ footer .socbuts a:hover{
}
.tile_1 .title_2, .tile_2 .title_2{font-size: 10px;}
.tile_1 a, .tile_1 a:hover, .tile_2 a, .tile_2 a:hover, .tile3 a:hover, .tile4 a:hover{color:#414143!important;}
-.tile_1 .picture:after, .tile_2 .picture:after, .tile3 .picture:after, .tile4 .picture:after, .cols a:after{
+.tile_1 .picture:after, .tile_2 .picture:after, .tile3 .picture:after, .tile4 .picture:after, .cols a:after, .actions_cont .picture:after{
content: '';
position: absolute;
width: 100%;
@@ -813,10 +813,11 @@ footer .socbuts a:hover{
background-repeat: no-repeat;
background-color: rgba(255, 255, 255, 0.83);
}
-.tile3 .picture, .tile4 .picture{
+.actions_cont .picture{overflow:hidden; }
+.tile3 .picture, .tile4 .picture, .actions_cont .picture{
position: relative;
}
-.tile_1 a:hover .picture:after, .tile_2 a:hover .picture:after, .tile3 a:hover .picture:after, .tile4 a:hover .picture:after, .cols a:hover:after{
+.tile_1 a:hover .picture:after, .tile_2 a:hover .picture:after, .tile3 a:hover .picture:after, .tile4 a:hover .picture:after, .cols a:hover:after, .actions_cont a:hover .picture:after{
top:0;
}
.tile_2 .title_1{
@@ -1303,6 +1304,13 @@ a.active{
font-weight: 600;
color: #000000;
}
+.title8{
+ font-size: 24px;
+ text-align: center;
+ text-transform: uppercase;
+ font-family: 'Lato-Light';
+ margin-bottom: 17px;
+}
.title_or{
font-family: 'Open Sans', sans-serif;
font-size: 24px;
@@ -1501,7 +1509,7 @@ p.right{text-align: right;}
}
.collection .head img{
max-width:960px;
- /*width:100%;*/
+ width:100%;
}
.cols{max-width: 960px;margin: 40px auto 25px;}
.cols a{
@@ -1556,13 +1564,14 @@ p.right{text-align: right;}
background-color: #e9e6e6;
top: 62px;
z-index: 30;
- padding: 10px 30px 45px;
+ padding: 20px 10px;
display: none;
}
.dropd_menu:before {
position: absolute;
content: '';
width: 17%;
+ min-width: 150px;
height: 45px;
background-color: rgba(255, 0, 0, 0);
left: 0;
@@ -1643,6 +1652,78 @@ p.right{text-align: right;}
background-color: #d2d2d2;
}
.pagination .active a{color:#000!important;background-color:white!important;}
+
+.action{max-width:260px;margin-bottom: 10px;}
+.action img{width:100%; max-width:227px;}
+.a_down{
+ display: flex;
+ align-items: center;
+ margin: 11px 0px;
+}
+.a_down .price{
+ font-family: 'Lato-Bold';
+ font-size: 18px;
+ width: 68px;
+ border-top: 1px solid #aaaaaa;
+ text-align: center;
+ border-bottom: 1px solid #aaaaaa;
+ height: 36px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.a_down .line1{
+ font-size: 15px;
+ font-family: 'Lato-Light';
+ font-weight: 600;
+}
+.a_down .line2{font-size: 9.42px;}
+.a_down .titles{margin-left: 15px;}
+.actions_cont{
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ overflow: hidden;
+}
+.down.act_d{
+ width: 960px;
+ margin-left: auto;
+ margin-right: auto;
+}
+.d_title{
+ text-transform: uppercase;
+ font-size: 18px;
+ font-weight: 600;
+}
+.act_d{margin-top:66px;}
+.act_d p{color:#878686;font-family: 'Lato-Light';font-weight: 600;font-size:15px;letter-spacing: 0.4px;}
+
+/**/
+.dropd_menu:before {
+ position: absolute;
+ content: '';
+ width: 17%;
+ min-width: 150px;
+ height: 45px;
+ background-color: rgba(255, 0, 0, 0);
+ left: 0;
+ top: -30px;
+}
+.dropd_menu {
+ width: initial!important;
+}
+.idp_el{
+ display: inline-block;
+}
+.idp_el a{
+ padding: 0!important;
+ margin-right: 40px!important;
+ text-align: left!important;
+}
+.inline_dropb{
+ padding-left: 38px;
+}
+
/**/
@media (min-width: 1200px){
.nav_up{
diff --git a/source/index.html b/source/index.html
index bee9db5..ca7e13c 100644
--- a/source/index.html
+++ b/source/index.html
@@ -30,7 +30,11 @@