{$category.name|escape}

{if $category.description}
{$category.description}
{/if} {* @event frontend_category.%plugin_id% *} {foreach $frontend_category as $_}{$_}{/foreach} {if $category.subcategories || !empty($category.params.enable_sorting) || !empty($filters)}
{if $category.subcategories} {/if}
{if !empty($filters)} {* Проверка применения фильтров *} {$filters_applied = false} {if $wa->get('price_min') || $wa->get('price_max')} {$filters_applied = true} {/if} {foreach $filters as $fid => $filter} {if $fid != 'price' && $wa->get($filter.code)} {$filters_applied = true} {break} {/if} {/foreach} {/if} {if !empty($category.params.enable_sorting)} {$sort_fields = [ 'name' => _w('Name'), 'price' => _w('Price'), 'total_sales' => _w('Bestsellers'), 'rating' => _w('Customer rating'), 'create_datetime'=>_w('Date added'), 'stock' => _w('In stock')]} {$inverted_sort_fields = [ 'rating' => true, 'create_datetime' => true, 'total_sales' => true, 'count' => true, 'stock' => true]} {if !isset($active_sort)} {$active_sort = $wa->get('sort', 'create_datetime')} {/if} {$current_sort = $wa->get('sort', '', 'string')} {$current_order = $wa->get('order', '', 'string')} {$is_new_popular_active = $current_sort == 'new' || (empty($current_sort) && !empty($category) && !$category.sort_products)} {$sorting_active_name = ''} {if isset($sort_fields[$active_sort])} {$sorting_active_name = $sort_fields[$active_sort]} {/if} {if $is_new_popular_active} {$sorting_active_name = _w('New & Popular')} {/if} {if $current_order} {$sorting_active_order = $current_order} {elseif (empty($current_sort) && !empty($category) && !$category.sort_products) || isset($inverted_sort_fields[$active_sort])} {$sorting_active_order = 'desc'} {else} {$sorting_active_order = 'asc'} {/if} {$sorting_active_order_symbol = '↑'} {if $sorting_active_order == 'desc'} {$sorting_active_order_symbol = '↓'} {/if} {if !$is_new_popular_active && !empty($current_sort) && isset($sort_fields[$current_sort])} {$wa->title($wa->title()|cat:' — '|cat:$sort_fields[$current_sort])} {/if} {/if}
{/if} {function filters_form_skeleton_items count=2 height='370px'} {for $i=1 to $count}
  • {/for} {/function} {capture assign="_filters_form_skeleton"}
    {/capture}
    {if !empty($filters)}
    {if waRequest::isXMLHttpRequest() && waRequest::get('page', 1) == 1} {/if}
    [`Filters`]
    {foreach $filters as $fid => $filter}
    {if $fid == 'price'} {$c = $wa->shop->currency(true)}
    [`Price`] ({$c.sign})
    {else} {$is_unit = !empty($filter.unit)}
    {$filter.name|escape} {if $is_unit} ({$filter.unit.title}){/if}
    {if $filter.type == 'boolean'} {elseif $filter.type == "range.date"} {$_v = $wa->get($filter.code)} {elseif isset($filter.min)} {$_v = $wa->get($filter.code)}
    {if $is_unit && $filter.unit.value != $filter.base_unit.value}{/if}
    {else} {foreach $filter.values as $v_id => $v} {/foreach} {/if} {/if}
    {/foreach} {if $wa->get('sort')}{/if} {if $wa->get('order')}{/if}
    {/if}
    {if !$products} {$page = waRequest::get('page', 1, 'int')} {$_message = _w("This category does not contain any products.")} {if $page > 1} {$_message = sprintf( _w('No products on this page. Continue viewing products of this category.'), $wa->getUrl('shop/category', ['category_url' => $category.full_url]) )} {elseif !empty($filters)} {$_message = _w("No products were found.")} {/if} {$_message} {else} {include file='list-thumbs.html' sorting=!empty($category.params.enable_sorting) has_sidebar=(!empty($filters))} {* or use the line below to change product list view {include file='list-table.html' sorting=!empty($category.params.enable_sorting)} *} {/if}