{$compare_p = waRequest::cookie('shop_compare', array(), waRequest::TYPE_ARRAY_INT)} {$favorite_p = waRequest::cookie("shop_favorite", '', waRequest::TYPE_STRING)} {$view_p = waRequest::cookie("shop_view", '', waRequest::TYPE_STRING)} {strip}
{if !empty($filters)} {$filter_fix = 1}
{foreach $filters as $fid => $filter} {if $fid == 'price'} {$c = $wa->shop->currency(true)}
[`Price`]:
get('price_min')}value="{(int)$wa->get('price_min')}"{/if} placeholder="{floor($filter.min)}"> get('price_max')}value="{(int)$wa->get('price_max')}"{/if} placeholder="{ceil($filter.max)}">
{floor($filter.min)} {$c.sign}
{ceil($filter.max)} {$c.sign}
{else}
{$filter.name|escape}:
{if $filter.type == 'boolean'}
{elseif isset($filter.min)} {$_v = $wa->get($filter.code)}
{if !empty($filter.unit)}{$filter.unit.title}{if $filter.unit.value != $filter.base_unit.value}{/if}{/if}
{else}
{foreach $filter.values as $v_id => $v}
5} style="display:none;"{/if}>
{/foreach} {if $filter.values|@count > 5} [`more`] {/if}
{/if}
{/if} {/foreach} {if $wa->get('sort')}{/if} {if $wa->get('order')}{/if}
{else} {$filter_fix = NULL}
{/if} {if $wa->get('view') == 'favorite'} {$wa->title('[`Favorite`]')}

[`Favorite`] ({$wa->shop->productsCount('id/'|cat:$favorite_p)})

{if $favorite_p} {/if}
{if !$favorite_p}

[`No products were found.`]

{else} {$products_ = $wa->shop->products('id/'|cat:$favorite_p)} {$products = []} {foreach explode(',', $favorite_p) as $a} {$products[] = $products_[$a]} {/foreach}
{include file="`$wa_active_theme_path`/list-thumbs.html" products=$products actions="favorite"}
{/if} {else if $wa->get('view') == 'seen'} {$wa->title('[`Viewed products`]')}

[`Viewed products`] ({$wa->shop->productsCount('id/'|cat:$view_p)})

{if $view_p} {/if}
{if !$view_p}

[`No products were found.`]

{else} {$products_ = $wa->shop->products('id/'|cat:$view_p)} {$products = []} {foreach explode(',', $view_p) as $a} {$products[] = $products_[$a]} {/foreach}
{include file="`$wa_active_theme_path`/list-thumbs.html" products=$products}
{/if} {else if $wa->get('view') == 'ajax_search'} {if $products}
{foreach $products|@array_slice:0:5 as $a} {if !$a@last}
{/if} {/foreach} {if $products|@count > 5} {else} {/if}
{/if} {else} {if isset($brand) and !empty($brand)}

{$title} ({$products_count}) {if !empty($filters)} [`Filter products`]{/if}

{* @event frontend_search.%plugin_id% *} {foreach $frontend_search as $_}{$_}{/foreach} {else}

[`Search results`] ({$products_count})

{* @event frontend_search.%plugin_id% *} {foreach $frontend_search as $_}{$_}{/foreach} {if $title}

[`Query`]: {$title}

{/if} {/if}
{if !$products} {if !empty($filters)}

[`No products were found.`]

{else}

[`This category does not contain any products.`]

{/if} {else} {if !empty($sorting)} {$sort_fields = ['name' => '[`Name`]', 'price' => '[`Price`]', 'total_sales' => '[`Bestsellers`]', 'rating' => '[`Customer rating`]', 'create_datetime'=>'[`Date added`]', 'stock' => '[`In stock`]']} {if !isset($active_sort)} {$active_sort = $wa->get('sort', 'create_datetime')} {/if}
{/if}
{include file="`$wa_active_theme_path`/list-thumbs.html" products=$products filter=$filter_fix}
{if isset($pages_count) && $pages_count > 1}
{wa_pagination total=$pages_count attrs=['class' => "pagination"]}
{/if}
{/if} {/if}
{/strip}