| 42 |
lars |
1 |
<script>
|
|
|
2 |
$(document).ready(function(){
|
|
|
3 |
$('.sort').change(function(){
|
|
|
4 |
var sort = $(this).val();
|
|
|
5 |
var href = window.location.href.split('?');
|
|
|
6 |
if(href.length>1) {
|
|
|
7 |
if( href[1].match("search") ) {
|
|
|
8 |
var search = $(".searchValue").val();
|
|
|
9 |
window.location.href = href[0] + "?search="+ search +"&sort="+sort;
|
|
|
10 |
}else{
|
|
|
11 |
window.location.href = href[0] + "?sort="+sort;
|
|
|
12 |
}
|
|
|
13 |
|
|
|
14 |
}else{
|
|
|
15 |
window.location.href = href[0] + "?sort="+sort;
|
|
|
16 |
}
|
|
|
17 |
});
|
|
|
18 |
});
|
|
|
19 |
</script>
|
|
|
20 |
<div class="pagination_container">
|
|
|
21 |
<div>
|
|
|
22 |
<div>
|
|
|
23 |
<label>Sortieren nach:</label>
|
|
|
24 |
<select name="sort" class="sort">
|
|
|
25 |
<option {if $smarty.get.sort=="rel" || !$smarty.get.sort}selected='selected'{/if} value="rel">nach Relevanz</option>
|
|
|
26 |
<option {if $smarty.get.sort=="asc"}selected='selected'{/if} value="asc">Preis aufsteigend</option>
|
|
|
27 |
<option {if $smarty.get.sort=="desc"}selected='selected'{/if} value="desc">Preis absteigend</option>
|
|
|
28 |
</select>
|
|
|
29 |
<input type="hidden" class="searchValue" value="{$smarty.get.search}" />
|
|
|
30 |
</div>
|
|
|
31 |
</div>
|
| 608 |
lars |
32 |
<div>{$subdir.item_anz} Artikel</div>
|
| 583 |
lars |
33 |
<div>{$pagination}</div>
|
| 42 |
lars |
34 |
</div>
|