Answer the question
In order to leave comments, you need to log in
How do I filter on the front by multiple October CMS values?
How can I filter the data by several parameters
filter
Shows only the last checkbox
public function scopeListFrontEnd($query, $options = [])
{
if($_SERVER['REQUEST_URI'] == '/') {
extract(array_merge([
'page' => 1,
'perPage' => 18,
'sort' => 'updated_at desc',
'townships' => null,
'exceptTownships' => null,
'township' => null,
'search' => '',
'published' => true,
'country_id' => '',
'state_id' => '',
'avto__privid' => '',
'avto__prignan' => '',
'avto__kpp' => '',
'avto__palyvo' => '',
'avto__price__value_min' => '',
'avto__price__value_max' => '',
'avto__obdvigyna__value_min' => '',
'avto__obdvigyna__value_max' => '',
'avto__year__value_min' => '',
'avto__year__value_max' => '',
'avto__type__car' => '',
'type_ogolosheny_seller' => 'no',
'exceptKvartus' => null,
], $options));
.........
if($avto__privid){
$query->where('avto__privid', '=', $avto__privid);
}
{% for avto__privid in avto__privids %}
<label class="content-radio-filtre avto__privid-label" {% if avto__privid %}{% else %}style="display:none;"{% endif %}>
<input type="checkbox" name="Filter[avto__privid]" class="name_select_avto__privid" value="{{avto__privid}}" hidden>
<i>{{ avto__privid }}</i>
<span class="check"></span>
</label>
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question