"+n[i].attributeName+"<\/td> | "+(n[i].CustomValue!=null?n[i].CustomValue:n[i].Name)+"<\/td><\/tr>")}function addModels(n,t){console.log(n,t);let r="#tblModels_"+t;$(r+" tbody").children().remove();for(var i=0;i'+n[i].ModelNo+"<\/td><\/tr>")}function addAlterList(n,t){console.log(n,t);let r="#divAlters_"+t;$(r).children().remove();for(var i=0;i'+n[i].Name+'<\/b> <\/a> '+n[i].Price+"<\/b> "+n[i].Sku+"<\/span> "+(n[i].InStock==!0?'<\/div> موجود<\/span>':'<\/div> ناموجود<\/span>')+(i!=n.length-1?" ":""))}}function openAlter(n){$.ajax({cache:!1,"async":!0,type:"POST",url:"/Specifications/getProductParent",data:{productId:n},success:function(n){n!=null&&(console.log(n,"data88"),window.open("/"+n.SeName,"_blank"))}})}function setStock(n,t,i,r){var u;u=i==2?stockProducts.find(n=>n.sku==r+"IR"):assocsitedProducts.find(n=>n.id==t);setTimeout(setSpecifications(u.id,t),5e3);$("#variant-"+t).text(u.name);$("#price-value-"+t).text(u.price);$("#stock-"+t).find("div:first").removeClass("withStock1");$("#stock-"+t).find("div:first").removeClass("noStock1");$("#stock-"+t).find("div:first").addClass(u.stock=="True"?"withStock1":"noStock1");$("#stock-"+t).find("b").text(u.stock=="True"?"موجود":"ناموجود");$("#sku-"+t).text(u.sku);$("#add-to-cart-button-"+t).attr("data-productid",u.id);$("#add-to-cart-button-"+t).attr("onclick",'return AjaxCart.addproducttocart_details("/addproducttocart/details/'+u.id+'/1","#product-details-form"),!1')}function setMainImage(n,t){$("#divGallery").find("img").removeClass("activeImg");$("#divMainPicture img").attr("src",t);$(n).addClass("activeImg")}function setSpecifications(n,t){let r=productList.find(t=>t.productId==n).product,i=productList.find(n=>n.productId==t).product;addAlterList(r.alterListDto,t);addSpecifications(i.specs,t);addPictures(i.PictureModels,t);addModels(i.relatedmodels,t)}var selectedSku=localStorage.getItem("selectedSku"),countt,i,p,mainProduct;localStorage.removeItem("selectedSku");var assocsitedProducts=[],stockProducts=[],productList=[];$("#divGallery").find("img:first").addClass("activeImg");$("#divMainPicture").hiZoom({width:300,height:200,position:"left",distance:1});$(".hizoom").hiZoom({width:300,height:200,position:"left",distance:1});countt="16";i=1;stockProducts.push({id:"11842",name:"بکلایت 42LS سری 34000",stock:"False",price:" 870,000 تومان",sku:"AGF42LS3A12"});stockProducts.push({id:"11843",name:"بکلایت 42LS سری 34000",stock:"False",price:" 230,000 تومان",sku:"AGF42LS3A12IR"});stockProducts.push({id:"11844",name:"بکلایت 42LS سری 34000",stock:"False",price:" تومان",sku:"AGF42LS3C12"});stockProducts.push({id:"11845",name:"بکلایت 42LS سری 34000",stock:"False",price:" 230,000 تومان",sku:"AGF42LS3C12IR"});stockProducts.push({id:"11846",name:"بکلایت 42LS فلتی",stock:"False",price:" 450,000 تومان",sku:"AGF42LSA601"});stockProducts.push({id:"11847",name:"بکلایت 42LS فلتی",stock:"False",price:" 140,000 تومان",sku:"AGF42LSA601IR"});stockProducts.push({id:"11848",name:"بکلایت 42LS سوکتی 8 پین",stock:"True",price:" 380,000 تومان",sku:"AGF42LSA60S"});stockProducts.push({id:"11849",name:"بکلایت 42LS تعداد 60 ال ای دی سوکتی",stock:"False",price:" 110,000 تومان",sku:"AGF42LSA60SIR"});stockProducts.push({id:"11850",name:"بکلایت 42LS سوکتی 6 پین",stock:"True",price:" 380,000 تومان",sku:"AGF42LSA641"});stockProducts.push({id:"11851",name:"بکلایت 42LS تعداد 64 ال ای دی سوکتی",stock:"False",price:" 170,000 تومان",sku:"AGF42LSA641IR"});stockProducts.push({id:"11852",name:"بکلایت 42LS فلتی",stock:"False",price:" 340,000 تومان",sku:"AGF42LSC601"});stockProducts.push({id:"11853",name:"بکلایت 42LS فلتی",stock:"False",price:" 140,000 تومان",sku:"AGF42LSC601IR"});stockProducts.push({id:"11854",name:"بکلایت 42LS سوکتی 8 پین",stock:"False",price:" 380,000 تومان",sku:"AGF42LSC60S"});stockProducts.push({id:"11855",name:"بکلایت 42LS تعداد 60 ال ای دی سوکتی",stock:"False",price:" 110,000 تومان",sku:"AGF42LSC60SIR"});stockProducts.push({id:"11856",name:"بکلایت 42LS سوکتی 6 پین",stock:"False",price:" 380,000 تومان",sku:"AGF42LSC641"});stockProducts.push({id:"11857",name:"بکلایت 42LS تعداد 64 ال ای دی سوکتی",stock:"False",price:" 170,000 تومان",sku:"AGF42LSC641IR"});console.log(countt,"countt");getProductDetail("11842");console.log("AGF42LS3A12_selected:"+selectedSku,"AGF42LS3A12".indexOf(selectedSku));$("#div_11842").offset()!==undefined&&"AGF42LS3A12".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11842").offset().top-200},500);selectedSku!=null&&"AGF42LS3A12".indexOf(selectedSku)!=-1&&$("#div_11842").css("border-top","2px solid red");assocsitedProducts.push({id:"11842",name:"بکلایت 42LS سری 34000",stock:"False",price:" 870,000 تومان",sku:"AGF42LS3A12"});console.log(countt,"countt");getProductDetail("11843");console.log("AGF42LS3A12IR_selected:"+selectedSku,"AGF42LS3A12IR".indexOf(selectedSku));$("#div_11842").offset()!==undefined&&"AGF42LS3A12IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11842").offset().top-200},500);selectedSku!=null&&"AGF42LS3A12IR".indexOf(selectedSku)!=-1&&$("#div_11842").css("border-top","2px solid red");p="AGF42LS3A12";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-11842][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11844");console.log("AGF42LS3C12_selected:"+selectedSku,"AGF42LS3C12".indexOf(selectedSku));$("#div_11844").offset()!==undefined&&"AGF42LS3C12".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11844").offset().top-200},500);selectedSku!=null&&"AGF42LS3C12".indexOf(selectedSku)!=-1&&$("#div_11844").css("border-top","2px solid red");assocsitedProducts.push({id:"11844",name:"بکلایت 42LS سری 34000",stock:"False",price:" تومان",sku:"AGF42LS3C12"});console.log(countt,"countt");getProductDetail("11845");console.log("AGF42LS3C12IR_selected:"+selectedSku,"AGF42LS3C12IR".indexOf(selectedSku));$("#div_11844").offset()!==undefined&&"AGF42LS3C12IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11844").offset().top-200},500);selectedSku!=null&&"AGF42LS3C12IR".indexOf(selectedSku)!=-1&&$("#div_11844").css("border-top","2px solid red");p="AGF42LS3C12";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-11844][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11846");console.log("AGF42LSA601_selected:"+selectedSku,"AGF42LSA601".indexOf(selectedSku));$("#div_11846").offset()!==undefined&&"AGF42LSA601".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11846").offset().top-200},500);selectedSku!=null&&"AGF42LSA601".indexOf(selectedSku)!=-1&&$("#div_11846").css("border-top","2px solid red");assocsitedProducts.push({id:"11846",name:"بکلایت 42LS فلتی",stock:"False",price:" 450,000 تومان",sku:"AGF42LSA601"});console.log(countt,"countt");getProductDetail("11847");console.log("AGF42LSA601IR_selected:"+selectedSku,"AGF42LSA601IR".indexOf(selectedSku));$("#div_11846").offset()!==undefined&&"AGF42LSA601IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11846").offset().top-200},500);selectedSku!=null&&"AGF42LSA601IR".indexOf(selectedSku)!=-1&&$("#div_11846").css("border-top","2px solid red");p="AGF42LSA601";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-11846][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11848");console.log("AGF42LSA60S_selected:"+selectedSku,"AGF42LSA60S".indexOf(selectedSku));$("#div_11848").offset()!==undefined&&"AGF42LSA60S".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11848").offset().top-200},500);selectedSku!=null&&"AGF42LSA60S".indexOf(selectedSku)!=-1&&$("#div_11848").css("border-top","2px solid red");assocsitedProducts.push({id:"11848",name:"بکلایت 42LS سوکتی 8 پین",stock:"True",price:" 380,000 تومان",sku:"AGF42LSA60S"});$("input[name=radio-11848][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11849");console.log("AGF42LSA60SIR_selected:"+selectedSku,"AGF42LSA60SIR".indexOf(selectedSku));$("#div_11848").offset()!==undefined&&"AGF42LSA60SIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11848").offset().top-200},500);selectedSku!=null&&"AGF42LSA60SIR".indexOf(selectedSku)!=-1&&$("#div_11848").css("border-top","2px solid red");p="AGF42LSA60S";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-11848][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11850");console.log("AGF42LSA641_selected:"+selectedSku,"AGF42LSA641".indexOf(selectedSku));$("#div_11850").offset()!==undefined&&"AGF42LSA641".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11850").offset().top-200},500);selectedSku!=null&&"AGF42LSA641".indexOf(selectedSku)!=-1&&$("#div_11850").css("border-top","2px solid red");assocsitedProducts.push({id:"11850",name:"بکلایت 42LS سوکتی 6 پین",stock:"True",price:" 380,000 تومان",sku:"AGF42LSA641"});$("input[name=radio-11850][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11851");console.log("AGF42LSA641IR_selected:"+selectedSku,"AGF42LSA641IR".indexOf(selectedSku));$("#div_11850").offset()!==undefined&&"AGF42LSA641IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11850").offset().top-200},500);selectedSku!=null&&"AGF42LSA641IR".indexOf(selectedSku)!=-1&&$("#div_11850").css("border-top","2px solid red");p="AGF42LSA641";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-11850][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11852");console.log("AGF42LSC601_selected:"+selectedSku,"AGF42LSC601".indexOf(selectedSku));$("#div_11852").offset()!==undefined&&"AGF42LSC601".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11852").offset().top-200},500);selectedSku!=null&&"AGF42LSC601".indexOf(selectedSku)!=-1&&$("#div_11852").css("border-top","2px solid red");assocsitedProducts.push({id:"11852",name:"بکلایت 42LS فلتی",stock:"False",price:" 340,000 تومان",sku:"AGF42LSC601"});console.log(countt,"countt");getProductDetail("11853");console.log("AGF42LSC601IR_selected:"+selectedSku,"AGF42LSC601IR".indexOf(selectedSku));$("#div_11852").offset()!==undefined&&"AGF42LSC601IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11852").offset().top-200},500);selectedSku!=null&&"AGF42LSC601IR".indexOf(selectedSku)!=-1&&$("#div_11852").css("border-top","2px solid red");p="AGF42LSC601";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-11852][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11854");console.log("AGF42LSC60S_selected:"+selectedSku,"AGF42LSC60S".indexOf(selectedSku));$("#div_11854").offset()!==undefined&&"AGF42LSC60S".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11854").offset().top-200},500);selectedSku!=null&&"AGF42LSC60S".indexOf(selectedSku)!=-1&&$("#div_11854").css("border-top","2px solid red");assocsitedProducts.push({id:"11854",name:"بکلایت 42LS سوکتی 8 پین",stock:"False",price:" 380,000 تومان",sku:"AGF42LSC60S"});console.log(countt,"countt");getProductDetail("11855");console.log("AGF42LSC60SIR_selected:"+selectedSku,"AGF42LSC60SIR".indexOf(selectedSku));$("#div_11854").offset()!==undefined&&"AGF42LSC60SIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11854").offset().top-200},500);selectedSku!=null&&"AGF42LSC60SIR".indexOf(selectedSku)!=-1&&$("#div_11854").css("border-top","2px solid red");p="AGF42LSC60S";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-11854][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("11856");console.log("AGF42LSC641_selected:"+selectedSku,"AGF42LSC641".indexOf(selectedSku));$("#div_11856").offset()!==undefined&&"AGF42LSC641".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11856").offset().top-200},500);selectedSku!=null&&"AGF42LSC641".indexOf(selectedSku)!=-1&&$("#div_11856").css("border-top","2px solid red");assocsitedProducts.push({id:"11856",name:"بکلایت 42LS سوکتی 6 پین",stock:"False",price:" 380,000 تومان",sku:"AGF42LSC641"});console.log(countt,"countt");getProductDetail("11857");console.log("AGF42LSC641IR_selected:"+selectedSku,"AGF42LSC641IR".indexOf(selectedSku));$("#div_11856").offset()!==undefined&&"AGF42LSC641IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_11856").offset().top-200},500);selectedSku!=null&&"AGF42LSC641IR".indexOf(selectedSku)!=-1&&$("#div_11856").css("border-top","2px solid red");p="AGF42LSC641";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-11856][value='1']").prop("checked",!0);$(function(){$(".hizoom").on("click",function(){let n=$(this).find("img").attr("src");$("#myModalBody").children().remove();$("#myModalBody").append('');var t=new bootstrap.Modal(document.getElementById("exampleModal"),{keyboard:!1});t.show()})})
| |