${item.Name}`)}function r(n){if(!n.id)return"Select an item";item=modelList.find(t=>t.Id==n.id);return $(` ${item.Name} `)}function t(n){if(!n.id)return"View All Products";item=spareProductList.find(t=>t.Id==n.id);return $(` ${item.Name}Add To Cart `)}function i(n){return`
Compare
`+(n.Price==null?`
Call for pricing: 0800699353 `:`
${n.Price} ${n.PriceReversedTax}
`)+`
${n.Name}
`}$("#prd-info").empty();$("#CategorySelection").on("click",".categoryItem",function(){$("#noticeText").show();return});$("#brand").on("change",function(){var i,u;($("#model").val("0"),$("#product").val("0"),i=$("#brand").val(),i!=""&&i!=0)&&(u={CategoryId:selectedCategoryState,BrandId:i},displayAjaxLoading(!0),n("get-model",u).success(function(n){sparePartsSelected=!1;$("#model").select2("destroy");catLocation=`/SparePartsFinder/ShowSpareParts?CategoryId=${selectedCategoryState}&BrandId=${i}`;modelList=n.models;var u=`-Model- `;$.each(n.models,function(n,t){u+=`${t.Name} `});$("#model").empty();$("#model").html(u);$("#model").select2({templateResult:r,closeOnSelect:!1});$("#product").select2("destroy");selectedHtml=`Spare Parts `;spareProductList=n.spareProducts;$("#prd-info").empty();$.each(n.spareProducts,function(n,t){selectedHtml+=`${t.Name} `});$("#product").empty();$("#product").html(selectedHtml);$("#product").select2({templateResult:t,closeOnSelect:!1})}))});$("#model").on("change",function(){var r=$(this).val(),u,f;r!=""&&r!=0&&(u=$("#brand").val(),f={ModelId:r,CategoryId:selectedCategoryState},displayAjaxLoading(!0),n(`get-spare-products`,f).success(function(n){sparePartsSelected=!1;$("#product").select2("destroy");spareProductList=n.spareProducts;catLocation=`/SparePartsFinder/ShowSpareParts?CategoryId=${selectedCategoryState}&BrandId=${u}&ModelId=${r}`;var f=`Spare Parts `;$("#prd-info").empty();$.each(n.spareProducts,function(n,t){f+=`${t.Name} `;$("#prd-info").append(i(t))});$("#product").empty();$("#product").html(f);$("#product").select2({templateResult:t,closeOnSelect:!1});$("#brand").val(n.brand).trigger("change.select2");$("#specification").val("").trigger("change.select2")}))});$("#specification").on("change",function(){var r,u;(sparePartsSelected=!1,r=$("#specification").val(),r!=""&&r!=0)&&(u={Specification:r,CategoryId:selectedCategoryState},displayAjaxLoading(!0),n(`get-spare-products-by-specification`,u).success(function(n){$("#product").select2("destroy");spareProductList=n.spareProducts;catLocation=`/spare-parts-finder/show-spare-products?CategoryId=${selectedCategoryState}&Specification=${r}`;var u=`Spare Parts `;$("#prd-info").empty();$.each(n.spareProducts,function(n,t){u+=`${t.Name} `;$("#prd-info").append(i(t))});$("#product").empty();$("#product").html(u);$("#product").select2({templateResult:t,closeOnSelect:!1})}))});$("#product").on("select2:selecting",function(n){var r,t,u,e;if(sparePartsSelected||$("#prd-info").empty(),sparePartsSelected=!0,r=n.params.args,t=n.params.args.data.id,t==-1||t==null||t==""){window.location=catLocation;return}let f=spareProductList.find(n=>n.Id==t);$("#prd-info").append(i(f));$(r.originalEvent.target).hasClass("addToCartCheckbox")&&(u="/addproducttocart/catalog/"+t+"/1/1",AjaxCart.addproducttocart_catalog(u));e={CategoryId:selectedCategoryState,ProductId:t}});$("#product").on("select2:unselecting",function(n){var t=n.params.args.data.id;$(`#prd-${t}`).remove()});var f=window.location.hash;$(f).click()})
Instance ID Token
Delete Token Needs Permission
Request Permission
Can't find what you are looking for? Click Here to Contact Us or call our friendly team on 0800 699 353 .