products.php
4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?php
/**
* @var $productProvider \yii\data\ActiveDataProvider
* @var View $this
*/
use frontend\widgets\FilterWidget;
use frontend\widgets\Seo;
use yii\helpers\Url;
use yii\web\View;
use yii\widgets\ListView;
$this->params['seo']['title'] = !empty($category->meta_title) ? $category->meta_title : '';
$this->params['seo']['fields']['meta-title'] = $category->meta_title;
$this->params['seo']['h1'] = !empty($category->h1) ? $category->h1 : $category->name;
$this->params['seo']['seo_text'] = $category->seo_text;
$this->params['seo']['description'] = $category->meta_desc;
$this->params['seo']['meta'] = $category->meta_robots;
$this->params['seo']['category_name'] = $category->name;
$this->params['breadcrumbs'][] = $category->name;
?>
<div class="container">
<div class="block-25" style="position: relative;">
<?= FilterWidget::widget([
'category'=>$category,
'groups'=> $groups,
'filter'=> $filter,
'brands' => $brands
])?>
<div class="clearfix"></div>
<div class="columnLeftInfo">
<!-- del_columnLeftInfo -->
<a href="http://ventolux.ua/"><img src="http://www.linija-svitla.ua/res/custom/images/banner/ventolux1.jpg"></a><br><br>
<div class="clearfix"></div>
<!-- del_columnLeftInfo_end -->
</div>
</div>
<div class="block-75" itemscope itemtype="http://schema.org/Product">
<h1 class="title"><?= Seo::widget([ 'row'=>'h1'])?></h1>
<div class="list_filters_links">
<div class="sort_block">
<span>Сортировка:</span>
<?= \yii\widgets\LinkSorter::widget([
'sort' => $productProvider->sort,
'attributes' => [
'price',
]
]);
?>
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
<script language="JavaScript">
$(document).ready(function(){
$('.toolbar-list').click(function(event) {
//alert(1);
$('.toolbar-list').addClass('selected');
$('.toolbar-grid').removeClass('selected');
$('#centrit .prodBox').addClass('list');
JsHttpRequest.query(
'hr_gate.php?test=500&r='+Math.random(),
{
'sp': "prod_list_style"
,'style': 1
},
function(result, errors) { },
true //disable caching
);
});
$('.toolbar-grid').click(function(event) {
$('.toolbar-grid').addClass('selected');
$('.toolbar-list').removeClass('selected');
$('#centrit .prodBox').removeClass('list');
JsHttpRequest.query(
'hr_gate.php?test=500&r='+Math.random(),
{
'sp': "prod_list_style"
,'style': 2
},
function(result, errors) { },
true //disable caching
);
});
});
</script>
<div class="catalog_product_list view_table">
<?= ListView::widget([
'dataProvider' => $productProvider,
'itemView' => function ($model, $key, $index, $widget) use($category) {
return $this->render('_product_item',[
'model' => $model,
'category' => $category
]);
},
'layout' => "{items}<div class=\"clearfix\"></div>{pager}",
])
?>
<div class="clearfix"></div>
</div>
</div>
</div>