Show Filters

Brands

    Condition

    Price

    to

    Clearance Items

    Show items in stock only

    Contact us

    /*window.scrollTo(0, 0);*/ }); } $('input[type=checkbox][name=hidestock]').change(function() { if(this.checked) { loadMe(); sendUrl(1); hideitems = 1; document.cookie = "hideitems=1;path=/" } else { loadMe(); sendUrl(0); hideitems = 0; document.cookie = "hideitems=0;path=/" } }); $('input[type=checkbox][name=typeselected]').change(function() { if(this.checked) { types.push(this.value); } else { const index = types.indexOf(this.value); if (index > -1) { types.splice(index, 1); } } callAction(); }); $('input[type=checkbox][name=conditionselected]').change(function() { console.log(condition) if (this.checked) { console.log(this.value) condition.push(this.value); } else { const index = condition.indexOf(this.value); if (index > -1) { condition.splice(index, 1); } } callAction(); }); $('input[type=checkbox][name=brandselected]').change(function() { if(this.checked) { brand.push(this.value); } else { const index = brand.indexOf(this.value); if (index > -1) { brand.splice(index, 1); } } callAction(); }); $('input[type=radio][name=priceselected]').change(function() { if(this.checked) { let val = this.value; priceto = ''; pricefrom = ''; val = replaceAll(val,"-", ' '); prices = val.split(' '); if(prices.length > 1){ pricefrom = prices[0]; priceto = prices[1]; callAction(); } else{ return false; } } callAction(); }); $("#priceFilter").click(function(e){ e.preventDefault(); let firstAmount = $("#amount-from").val(); let secondAmount = $("#amount-to").val(); pricefrom = firstAmount; priceto = secondAmount; callAction(); }) $("#clearFilters").click(function(e){ $('input[type=checkbox][name=brandselected]').removeAttr('checked') $('input[type=checkbox][name=typeselected]').removeAttr('checked') $('input[type=checkbox][name=priceselected]').removeAttr('checked') $('input[type=checkbox][name=conditionselected]').removeAttr('checked') brand = []; priceto = null; pricefrom = null; hideitems = 1; condition = []; types = []; callAction(); }) function sendUrl(condition){ var url = window.location.href; if (url.indexOf('?') > -1){ loadMe(); url = url.split("?"); url = url[0]; } url += '?show='+$("#showelement").val()+'&order='+$("#orderelement").val(); window.location.href = url; } $( "#showelement" ).change(function() { sendUrl(); }); $( "#orderelement" ).change(function() { sendUrl(); }); }); -->