Фильтр товаров (eshop.filter)
Компонент предназначен для подборки товаров по определенным характеристикам, стоимости и бренду.
Название | Параметр | Описание |
---|---|---|
Шаблон компонента | template | |
Источник данных | catalog |
<div class="filter-collapse collapse" id="filter-collapse">
{form method='post'}
<div class="filter-group">
[if=price_min_value]
<div class="filter">
<h3 class="filter-title">Цена</h3>
<div class="collapse in">
<div class="filter-body">
<div class="filter-range">
<div class="filter-range-fields">
<div class="filter-range-row row">
<div class="col-xs-6">
<input type="text" name="{price_min_name}" value="{price_min_value}" placeholder="{price_min}" class="form-control">
</div>
<div class="col-xs-6">
<input type="text" name="{price_max_name}" value="{price_max_value}" placeholder="{price_max}" class="form-control">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
[/price_min_value]
<div class="filter filter-hidden">
<h3 class="filter-title">Бренд</h3>
<div class="collapse">
<div class="filter-body">
{brands}
<div class="filter-checkbox">
<label>
<input type="checkbox" name="{brands:name}" value="{brands:id}" {brands:checked}>
<span></span> {brands:title}
</label>
</div>
{/brands}
</div>
</div>
</div>
{elements}
<div class="filter filter-hidden">
<h3 class="filter-title">{elements:title}</h3>
<div class="collapse">
<div class="filter-body">
{elements:features}
<div class="filter-checkbox">
<label>
<input type="checkbox" name="{elements:features:name}" value="{elements:features:value}" {elements:features:checked}>
<span></span> {elements:features:title}
</label>
</div>
{/elements:features}
</div>
</div>
</div>
{/elements}
<div class="filter filter-hidden">
<h3 class="filter-title collapsed">Наличие</h3>
<div class="collapse">
<div class="filter-body">
{available}
<div class="filter-checkbox">
<label>
<input type="checkbox" name="{available:name}" value="{available:id}" {available:checked}>
<span></span> {available:title}
</label>
</div>
{/available}
</div>
</div>
</div>
<div class="filter">
<div class="filter-button">
<div class="filter-button-row row">
<div class="col-xs-6 filter-button-col">
<button type="submit" class="btn btn-primary btn-block">Применить</button>
</div>
<div class="col-xs-6 filter-button-col">
<a href="{clean_href}" class="btn btn-default btn-block">Очистить</a>
</div>
</div>
</div>
</div>
</div>
{/form}
</div>