{* *}{strip} {* *} {$propNames = ['*']} {if !empty($config->ecommerceFilterByTags)} {* *} {$items = $brand->tags|default:''} {if empty($items)} {if !empty($category->path)} {foreach $category->path as $item} {$item = $item->category_id|default:''} {if isset($categories_list[$item])} {$item = $categories_list[$item]->tags|default:''} {if !empty($item)} {$items = $item} {/if} {/if} {/foreach} {/if} {if empty($items)} {$items = $category->tags|default:''} {/if} {/if} {* *} {$items = explode(',', $items)} {if !empty($items)} {$values = []} {foreach $items as $item} {$item = trim($item)} {if !empty($item)} {if $item != '*'} {$values[$item|lower] = $item} {else} {$values = [$item]} {break} {/if} {/if} {/foreach} {if !empty($values)} {$propNames = $values} {/if} {/if} {/if} {* *} {$max = $helper->priceForScreen(5000)} {$max = intval($max)} {* *} {echoVar from=cost_from def=0 assign=cost_from} {$cost_from = intval($cost_from)} {$cost_from = min($cost_from, $max)} {$cost_from = max(0, $cost_from)} {echoVar from=cost_to def=$max assign=cost_to} {$cost_to = intval($cost_to)} {$cost_to = min($cost_to, $max)} {$cost_to = max(0, $cost_to)} {$cost_to = max($cost_from, $cost_to)} {$cost_from = ($cost_from != 0) ? $cost_from : ''} {$cost_to = ($cost_to != 0) ? $cost_to : ''} {* *}

Цена {sign}

0 {$max}
{* *} Сбросить фильтр {* *} {$left = []} {$leftSize = 0} {$right = []} {$rightSize = (!empty($config->ecommerceFilterOneColumn)) ? 10000000 : 0} {* *} {if empty($config->ecommerceFilterByTags) && !empty($brands)} {$items = []} {* *} {$options = []} {foreach $brands as $item} {name assign=value} {$value = $value|lower} {$options[$value] = $item} {/foreach} {$value = ksort($options, $smarty.const.SORT_STRING)} {$all = FALSE} {$number = 1} {foreach $options as $item} {inputValue from='item->brand_id' assign=id} {$checked = (isset($smarty.request.filter_brand.$id)) ? 'checked' : ''} {$class = (empty($item->actual)) ? 'class="disabled"' : (($number > 5) ? 'class="more"' : '')} {$disabled = (empty($item->actual)) ? 'disabled' : ''} {$number = (empty($item->actual)) ? $number : $number + 1} {$all = $all || $disabled != '' || $class != ''} {capture assign=item}
  • {/capture} {$items[] = $item} {/foreach} {if $all} {$items[] = '
  • все
  • '} {/if} {* *} {if $leftSize <= $rightSize} {$left[] = [ 'items' => $items, 'name' => 'Производители' ]} {$leftSize = $leftSize + count($items) + 1} {else} {$right[] = [ 'items' => $items, 'name' => 'Производители' ]} {$rightSize = $rightSize + count($items) + 1} {/if} {/if} {* *} {if empty($config->ecommerceNoFilterVariants) && empty($config->ecommerceFilterByTags) && !empty($variants)} {$items = []} {* *} {foreach $variants as $item} {inputValue from='item->name' assign=id} {$checked = (isset($smarty.request.filter_variant.$id)) ? 'checked' : ''} {$class = (empty($item->actual)) ? 'class="disabled"' : ''} {$disabled = (empty($item->actual)) ? 'disabled' : ''} {capture assign=item}
  • {/capture} {$items[] = $item} {/foreach} {* *} {if $leftSize <= $rightSize} {$left[] = [ 'items' => $items, 'name' => 'Варианты' ]} {$leftSize = $leftSize + count($items) + 1} {else} {$right[] = [ 'items' => $items, 'name' => 'Варианты' ]} {$rightSize = $rightSize + count($items) + 1} {/if} {/if} {* *} {if !empty($properties)} {foreach $propNames as $propName} {foreach $properties as $item} {if $propName == '*' || $propName|lower == $item->name|lower} {if !empty($item->options)} {inputValue from='item->property_id' assign=id} {$items = []} {* *} {$options = []} {foreach $item->options as $option} {inputValue from='option->value' assign=value} {$value = $value|lower} {$options[$value] = $option} {/foreach} {$value = ksort($options, $smarty.const.SORT_STRING)} {$all = FALSE} {$number = 1} {foreach $options as $option} {inputValue from='option->value' assign=value} {$checked = (isset($smarty.request.filter_property.$id.$value)) ? 'checked' : ''} {$class = (empty($option->actual)) ? 'class="disabled"' : (($number > 5) ? 'class="more"' : '')} {$disabled = (empty($option->actual)) ? 'disabled' : ''} {$number = (empty($option->actual)) ? $number : $number + 1} {$all = $all || $disabled != '' || $class != ''} {capture assign=option}
  • {/capture} {$items[] = $option} {/foreach} {if $all} {$items[] = '
  • все
  • '} {/if} {* *} {if $leftSize <= $rightSize} {$left[] = [ 'items' => $items, 'name' => $item->name ]} {$leftSize = $leftSize + count($items) + 1} {else} {$right[] = [ 'items' => $items, 'name' => $item->name ]} {$rightSize = $rightSize + count($items) + 1} {/if} {/if} {/if} {/foreach} {/foreach} {/if} {* *} {$class = (!empty($config->ecommerceFilterOneColumn)) ? 'one-column' : ''}
    {if !empty($left)}
    {foreach $left as $items}

    {$items['name']}

      {foreach $items['items'] as $item} {$item} {/foreach}
    {/foreach}
    {/if} {* *} {if !empty($right)}
    {foreach $right as $items}

    {$items['name']}

      {foreach $items['items'] as $item} {$item} {/foreach}
    {/foreach}
    {/if} {* *} {$checked = (!isset($smarty.request.modeOneClick) || $smarty.request.modeOneClick) ? 'checked' : ''}

    {* *} Сбросить $ *


    {* *} {if empty($config->ecommerceNoFilterCategories)} {if !empty($category->subcategories)}

    Подразделы

    {elseif empty($category) && !empty($categories)}

    Разделы

    {/if} {/if} {* *} {if empty($config->ecommerceNoFilterBrands)} {if empty($brands) && !empty($all_brands)}

    Все производители

    {/if} {/if}
    {* *} {/strip}