Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {* $Id$ *}
- {** block-description:original **}
- {if $items && !$smarty.request.advanced_filter}
- {if $smarty.server.QUERY_STRING|strpos:"dispatch=" !== false}
- {assign var="curl" value=$config.current_url}
- {assign var="filter_qstring" value=$curl|fn_query_remove:"result_ids":"filter_id":"view_all":"req_range_id":"advanced_filter":"features_hash":"subcats":"page"}
- {else}
- {assign var="filter_qstring" value="products.search"}
- {/if}
- {assign var="reset_qstring" value="products.search"}
- {if $smarty.request.category_id}
- {assign var="filter_qstring" value=$filter_qstring|fn_link_attach:"subcats=Y"}
- {assign var="reset_qstring" value=$reset_qstring|fn_link_attach:"subcats=Y"}
- {/if}
- {assign var="has_selected" value=false}
- {foreach from=$items item="filter" name="filters"}
- <h4>{$filter.filter}</h4>
- <ul class="filtru" id="content_product_more_filters_{$block.block_id}_{$filter.filter_id}">
- <select name="$filter.filter" onchange="jQuery.redirect(this.value) ;">
- <option value="{$filter.filter}" >-Alege {$filter.filter}-</option>
- {foreach from=$filter.ranges name="ranges" item="range"}
- {if $range.selected == true}
- {assign var="fh" value=$smarty.request.features_hash|fn_delete_range_from_url:$range:$filter.field_type}
- {foreach from=$filter.other_variants item="r"}
- {assign var="filter_query_elm" value=$fh|fn_add_range_to_url_hash:$r:$filter.field_type}
- {if $fh}
- {assign var="cur_features_hash" value="&features_hash=`$fh`"}
- {/if}
- {assign var="has_selected" value=true}
- <option value="{if $r.feature_type == "E" && !$r.simple_link && $controller == "product_features"}{"product_features.view?variant_id=`$r.range_id``$cur_features_hash`"|fn_url}{else}{$filter_qstring|fn_link_attach:"features_hash=`$filter_query_elm`"|fn_url}{/if}">{$filter.prefix}{$r.range_name|fn_text_placeholders}{$filter.suffix}</option>
- {assign var="has_selected" value=true}
- {/foreach}
- {else}
- {assign var="filter_query_elm" value=$smarty.request.features_hash|fn_add_range_to_url_hash:$range:$filter.field_type}
- {if $smarty.request.features_hash}
- {assign var="cur_features_hash" value="&features_hash=`$smarty.request.features_hash`"}
- {/if}
- <option value="{if $filter.feature_type == "E" && !$filter.simple_link}{"product_features.view?variant_id=`$range.range_id``$cur_features_hash`"|fn_url}{else}{$filter_qstring|fn_link_attach:"features_hash=`$filter_query_elm`"|fn_url}{/if}" {if $range.selected}selected="selected"{/if}>{$filter.prefix}{$range.range_name|fn_text_placeholders}{$filter.suffix}</option>
- {/if}
- {/foreach}
- </select><div>
- {$range.selected|@var_dump}
- <!-- "vezi mai mult"
- {if $smarty.foreach.ranges.iteration > $smarty.const.FILTERS_RANGES_COUNT}
- <li class="right">
- <a onclick="$('#content_product_more_filters_{$block.block_id}_{$filter.filter_id} li').show(); $('#view_all_{$block.block_id}_{$filter.filter_id}').show(); $(this).hide(); return false;" class="extra-link">{$lang.more}</a>
- </li>
- {/if}
- {if $filter.more_cut}
- {capture name="q"}{$filter_qstring|unescape}&filter_id={$filter.filter_id}&{if $smarty.request.features_hash}&features_hash={$smarty.request.features_hash|fn_delete_range_from_url:$range:$filter.field_type}{/if}{/capture}
- <li id="view_all_{$block.block_id}_{$filter.filter_id}" class="right hidden">
- {assign var="capture_q" value=$smarty.capture.q|escape:url}
- <a href="{"product_features.view_all?q=`$capture_q`"|fn_url}" rel="nofollow" class="extra-link">{$lang.view_all}</a>
- </li>
- {/if}
- --!>
- <li class="delim"> </li>
- </ul>
- {/foreach}
- <div class="clear filters-tools">
- <div class="float-right"><a {if "FILTER_CUSTOM_ADVANCED"|defined}href="{"products.search?advanced_filter=Y"|fn_url}"{else}href="{$filter_qstring|fn_link_attach:"advanced_filter=Y"|fn_url}"{/if} rel="nofollow" class="secondary-link lowercase">{$lang.advanced}</a></div>
- {if $has_selected}
- <a href="{if $smarty.request.category_id}{"categories.view?category_id=`$smarty.request.category_id`"|fn_url}{else}{$index_script|fn_url}{/if}" rel="nofollow" class="reset-filters">{$lang.reset}</a>
- {/if}
- </div>
- {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement