"+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:"9180",name:"برد خط کشی 65SJ95000",stock:"False",price:" 580,000 تومان",sku:"6870S-2474B"});stockProducts.push({id:"9181",name:"برد خط کشی 65SJ95000",stock:"True",price:" 390,000 تومان",sku:"6870S-2474BIR"});stockProducts.push({id:"9182",name:"برد خط کشی 65SJ95000",stock:"False",price:" 580,000 تومان",sku:"6870S-2475B"});stockProducts.push({id:"9183",name:"برد خط کشی 65SJ95000",stock:"True",price:" 390,000 تومان",sku:"6870S-2475BIR"});stockProducts.push({id:"9184",name:"برد خط کشی 65SJ95000",stock:"False",price:" 580,000 تومان",sku:"6870S-2476B"});stockProducts.push({id:"9185",name:"برد خط کشی 65SJ95000",stock:"True",price:" 390,000 تومان",sku:"6870S-2476BIR"});stockProducts.push({id:"9186",name:"برد خط کشی 65SJ95000",stock:"False",price:" 580,000 تومان",sku:"6870S-2477B"});stockProducts.push({id:"9187",name:"برد خط کشی 65SJ95000",stock:"True",price:" 390,000 تومان",sku:"6870S-2477BIR"});stockProducts.push({id:"26370",name:"6870S-2474A",stock:"True",price:" 680,000 تومان",sku:"6870S-2474AIR"});stockProducts.push({id:"26371",name:"6870S-2474A",stock:"False",price:" 880,000 تومان",sku:"6870S-2474A"});stockProducts.push({id:"26372",name:"6870S-2475A",stock:"True",price:" 680,000 تومان",sku:"6870S-2475AIR"});stockProducts.push({id:"26373",name:"6870S-2475A",stock:"False",price:" 880,000 تومان",sku:"6870S-2475A"});stockProducts.push({id:"26374",name:"6870S-2476A",stock:"True",price:" 680,000 تومان",sku:"6870S-2476AIR"});stockProducts.push({id:"26375",name:"6870S-2476A",stock:"False",price:" 880,000 تومان",sku:"6870S-2476A"});stockProducts.push({id:"26376",name:"6870S-2477A",stock:"True",price:" 680,000 تومان",sku:"6870S-2477AIR"});stockProducts.push({id:"26377",name:"6870S-2477A",stock:"False",price:" 880,000 تومان",sku:"6870S-2477A"});console.log(countt,"countt");getProductDetail("9180");console.log("6870S-2474B_selected:"+selectedSku,"6870S-2474B".indexOf(selectedSku));$("#div_9180").offset()!==undefined&&"6870S-2474B".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_9180").offset().top-200},500);selectedSku!=null&&"6870S-2474B".indexOf(selectedSku)!=-1&&$("#div_9180").css("border-top","2px solid red");assocsitedProducts.push({id:"9180",name:"برد خط کشی 65SJ95000",stock:"False",price:" 580,000 تومان",sku:"6870S-2474B"});console.log(countt,"countt");getProductDetail("9181");console.log("6870S-2474BIR_selected:"+selectedSku,"6870S-2474BIR".indexOf(selectedSku));$("#div_9180").offset()!==undefined&&"6870S-2474BIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_9180").offset().top-200},500);selectedSku!=null&&"6870S-2474BIR".indexOf(selectedSku)!=-1&&$("#div_9180").css("border-top","2px solid red");p="6870S-2474B";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-9180][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("9182");console.log("6870S-2475B_selected:"+selectedSku,"6870S-2475B".indexOf(selectedSku));$("#div_9182").offset()!==undefined&&"6870S-2475B".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_9182").offset().top-200},500);selectedSku!=null&&"6870S-2475B".indexOf(selectedSku)!=-1&&$("#div_9182").css("border-top","2px solid red");assocsitedProducts.push({id:"9182",name:"برد خط کشی 65SJ95000",stock:"False",price:" 580,000 تومان",sku:"6870S-2475B"});console.log(countt,"countt");getProductDetail("9183");console.log("6870S-2475BIR_selected:"+selectedSku,"6870S-2475BIR".indexOf(selectedSku));$("#div_9182").offset()!==undefined&&"6870S-2475BIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_9182").offset().top-200},500);selectedSku!=null&&"6870S-2475BIR".indexOf(selectedSku)!=-1&&$("#div_9182").css("border-top","2px solid red");p="6870S-2475B";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-9182][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("9184");console.log("6870S-2476B_selected:"+selectedSku,"6870S-2476B".indexOf(selectedSku));$("#div_9184").offset()!==undefined&&"6870S-2476B".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_9184").offset().top-200},500);selectedSku!=null&&"6870S-2476B".indexOf(selectedSku)!=-1&&$("#div_9184").css("border-top","2px solid red");assocsitedProducts.push({id:"9184",name:"برد خط کشی 65SJ95000",stock:"False",price:" 580,000 تومان",sku:"6870S-2476B"});console.log(countt,"countt");getProductDetail("9185");console.log("6870S-2476BIR_selected:"+selectedSku,"6870S-2476BIR".indexOf(selectedSku));$("#div_9184").offset()!==undefined&&"6870S-2476BIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_9184").offset().top-200},500);selectedSku!=null&&"6870S-2476BIR".indexOf(selectedSku)!=-1&&$("#div_9184").css("border-top","2px solid red");p="6870S-2476B";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-9184][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("9186");console.log("6870S-2477B_selected:"+selectedSku,"6870S-2477B".indexOf(selectedSku));$("#div_9186").offset()!==undefined&&"6870S-2477B".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_9186").offset().top-200},500);selectedSku!=null&&"6870S-2477B".indexOf(selectedSku)!=-1&&$("#div_9186").css("border-top","2px solid red");assocsitedProducts.push({id:"9186",name:"برد خط کشی 65SJ95000",stock:"False",price:" 580,000 تومان",sku:"6870S-2477B"});console.log(countt,"countt");getProductDetail("9187");console.log("6870S-2477BIR_selected:"+selectedSku,"6870S-2477BIR".indexOf(selectedSku));$("#div_9186").offset()!==undefined&&"6870S-2477BIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_9186").offset().top-200},500);selectedSku!=null&&"6870S-2477BIR".indexOf(selectedSku)!=-1&&$("#div_9186").css("border-top","2px solid red");p="6870S-2477B";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-9186][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("26370");console.log("6870S-2474AIR_selected:"+selectedSku,"6870S-2474AIR".indexOf(selectedSku));$("#div_26369").offset()!==undefined&&"6870S-2474AIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26369").offset().top-200},500);selectedSku!=null&&"6870S-2474AIR".indexOf(selectedSku)!=-1&&$("#div_26369").css("border-top","2px solid red");p="6870S-2474A";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-26369][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("26371");console.log("6870S-2474A_selected:"+selectedSku,"6870S-2474A".indexOf(selectedSku));$("#div_26371").offset()!==undefined&&"6870S-2474A".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26371").offset().top-200},500);selectedSku!=null&&"6870S-2474A".indexOf(selectedSku)!=-1&&$("#div_26371").css("border-top","2px solid red");assocsitedProducts.push({id:"26371",name:"6870S-2474A",stock:"False",price:" 880,000 تومان",sku:"6870S-2474A"});console.log(countt,"countt");getProductDetail("26372");console.log("6870S-2475AIR_selected:"+selectedSku,"6870S-2475AIR".indexOf(selectedSku));$("#div_26371").offset()!==undefined&&"6870S-2475AIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26371").offset().top-200},500);selectedSku!=null&&"6870S-2475AIR".indexOf(selectedSku)!=-1&&$("#div_26371").css("border-top","2px solid red");p="6870S-2475A";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-26371][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("26373");console.log("6870S-2475A_selected:"+selectedSku,"6870S-2475A".indexOf(selectedSku));$("#div_26373").offset()!==undefined&&"6870S-2475A".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26373").offset().top-200},500);selectedSku!=null&&"6870S-2475A".indexOf(selectedSku)!=-1&&$("#div_26373").css("border-top","2px solid red");assocsitedProducts.push({id:"26373",name:"6870S-2475A",stock:"False",price:" 880,000 تومان",sku:"6870S-2475A"});console.log(countt,"countt");getProductDetail("26374");console.log("6870S-2476AIR_selected:"+selectedSku,"6870S-2476AIR".indexOf(selectedSku));$("#div_26373").offset()!==undefined&&"6870S-2476AIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26373").offset().top-200},500);selectedSku!=null&&"6870S-2476AIR".indexOf(selectedSku)!=-1&&$("#div_26373").css("border-top","2px solid red");p="6870S-2476A";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-26373][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("26375");console.log("6870S-2476A_selected:"+selectedSku,"6870S-2476A".indexOf(selectedSku));$("#div_26375").offset()!==undefined&&"6870S-2476A".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26375").offset().top-200},500);selectedSku!=null&&"6870S-2476A".indexOf(selectedSku)!=-1&&$("#div_26375").css("border-top","2px solid red");assocsitedProducts.push({id:"26375",name:"6870S-2476A",stock:"False",price:" 880,000 تومان",sku:"6870S-2476A"});console.log(countt,"countt");getProductDetail("26376");console.log("6870S-2477AIR_selected:"+selectedSku,"6870S-2477AIR".indexOf(selectedSku));$("#div_26375").offset()!==undefined&&"6870S-2477AIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26375").offset().top-200},500);selectedSku!=null&&"6870S-2477AIR".indexOf(selectedSku)!=-1&&$("#div_26375").css("border-top","2px solid red");p="6870S-2477A";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-26375][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("26377");console.log("6870S-2477A_selected:"+selectedSku,"6870S-2477A".indexOf(selectedSku));$("#div_26377").offset()!==undefined&&"6870S-2477A".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26377").offset().top-200},500);selectedSku!=null&&"6870S-2477A".indexOf(selectedSku)!=-1&&$("#div_26377").css("border-top","2px solid red");assocsitedProducts.push({id:"26377",name:"6870S-2477A",stock:"False",price:" 880,000 تومان",sku:"6870S-2477A"});$(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()})})
| |