{/if}
</div>
- {if !empty($smarty.post.manufacturers)}
- {foreach $smarty.post.manufacturers as $key=>$value}
+ {if !empty($smarty.request.manufacturers)}
+ {foreach $smarty.request.manufacturers as $key=>$value}
{$manufacturers[] = $value}
{/foreach}
{/if}
<script type="text/javascript">
jQuery(document).ready(function($) {
-
+
function getParameterByName(name, url) {
if (!url) {
url = window.location.href;
}
}
-
+
brands.push(item);
}
});
-
+
});
$.each(brands, function(index, item){
$('#brands').append(option);
});
-
+
$("#brands").html($('#brands option').sort(function(x, y) {
return $(x).text() < $(y).text() ? -1 : 1;
}));
if( $('#brands').prev().children('li').length <= 0 ){
$("#rvManufacturers").prev().prev().prop('disabled', false);
- }
-
+ }
+
});
$('#brands').on("change", function(){
$("#rvManufacturers").prev().prev().prop("disabled",false);
}
});
-
+
if( $('#rvManufacturers').find(":selected").length > 0 ){
var brand_ids = $('#brands').val();
-
- $('#brands option').remove();
-
+
+ $('#brands option').remove();
+
var brands = [];
var cat_id = $('#rvManufacturers').val();
-
+
$.each(cat_id, function(index, item){
var select_id = item;
$.each(categories , function(index, item){
}
});
});
-
+
var searched_brand;
-
+
$.each(brands, function(index, item){
-
+
if( $.inArray(item.id, brand_ids) === 0){
-
- searched_brand = true;
+
+ searched_brand = true;
} else {
-
- searched_brand = false;
+
+ searched_brand = false;
}
-
+
{literal} var option = $('<option>', {selected: searched_brand, value: item.id, text: item.name}); {/literal}
$('#brands').append(option);
});
$('#brands').prev().prev().remove();
$('#brands').prev().remove();
}
-
+
$("#brands").html($('#brands option').sort(function(x, y) {
return $(x).text() < $(y).text() ? -1 : 1;
}));
jQuery('select[multiple]').asmSelect();
-
+
// Show search filters box
{if $settings.list_show_search}