1
1
<?php namespace OFFLINE \Mall \Components ;
2
2
3
- use DB ;
4
3
use Illuminate \Database \Eloquent \ModelNotFoundException ;
5
4
use Illuminate \Support \Collection ;
6
5
use OFFLINE \Mall \Classes \CategoryFilter \Filter ;
15
14
use OFFLINE \Mall \Models \Currency ;
16
15
use OFFLINE \Mall \Models \Property ;
17
16
use OFFLINE \Mall \Models \PropertyGroup ;
18
- use Session ;
19
- use Validator ;
20
17
21
18
/**
22
19
* The ProductsFilter component is used to filter items of
@@ -33,120 +30,140 @@ class ProductsFilter extends MallComponent
33
30
* @var Category
34
31
*/
35
32
public $ category ;
33
+
36
34
/**
37
35
* A Collection of all subcategories.
38
36
*
39
37
* @var Collection
40
38
*/
41
39
public $ categories ;
40
+
42
41
/**
43
42
* All items in this category.
44
43
*
45
44
* @var Collection<Product|Variant>
46
45
*/
47
46
public $ items ;
47
+
48
48
/**
49
49
* All available property values.
50
50
*
51
51
* @var Collection
52
52
*/
53
53
public $ values ;
54
+
54
55
/**
55
56
* All available property filters.
56
57
*
57
58
* @var Collection
58
59
*/
59
60
public $ propertyGroups ;
61
+
60
62
/**
61
63
* A collection of available Property models.
62
64
*
63
65
* @var Collection
64
66
*/
65
67
public $ props ;
68
+
66
69
/**
67
70
* All active Filters.
68
71
*
69
72
* @var Collection
70
73
*/
71
74
public $ filter ;
75
+
72
76
/**
73
77
* Query string representation of the active filter.
74
78
*
75
79
* @var string
76
80
*/
77
81
public $ queryString ;
82
+
78
83
/**
79
84
* Show the price range filter.
80
85
*
81
86
* @var boolean
82
87
*/
83
88
public $ showPriceFilter ;
89
+
84
90
/**
85
91
* Show the brand filter.
86
92
*
87
93
* @var boolean
88
94
*/
89
95
public $ showBrandFilter ;
96
+
90
97
/**
91
98
* Show the on sale filter.
92
99
*
93
100
* @var boolean
94
101
*/
95
102
public $ showOnSaleFilter ;
103
+
96
104
/**
97
105
* All available brands.
98
106
*
99
107
* @var Collection<Brand>
100
108
*/
101
109
public $ brands ;
110
+
102
111
/**
103
112
* Include all items from child categories.
104
113
*
105
114
* @var boolean
106
115
*/
107
116
public $ includeChildren ;
117
+
108
118
/**
109
119
* Also filter Variant properties.
110
120
*
111
121
* @var boolean
112
122
*/
113
123
public $ includeVariants ;
124
+
114
125
/**
115
126
* The min and max values of the price range.
116
127
*
117
128
* @var array
118
129
*/
119
130
public $ priceRange ;
131
+
120
132
/**
121
133
* The active Currency.
122
134
*
123
135
* @var Currency
124
136
*/
125
137
public $ currency ;
138
+
126
139
/**
127
140
* The active sort order.
128
141
*
129
142
* @var string
130
143
*/
131
144
public $ sortOrder ;
145
+
132
146
/**
133
147
* All available sort Options.
134
148
*
135
149
* @var array
136
150
*/
137
151
public $ sortOptions ;
152
+
138
153
/**
139
154
* Sort order of the products component.
140
155
*
141
156
* @var string
142
157
*/
143
158
public $ productsComponentSort ;
159
+
144
160
/**
145
161
* Category of the products component.
146
162
*
147
163
* @var Category
148
164
*/
149
165
public $ productsComponentCategory ;
166
+
150
167
/**
151
168
* An instance of the money formatter class.
152
169
*
0 commit comments