"+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:"15701",name:"کنترل هوشمند سامسونگ",stock:"False",price:" 780,000 تومان",sku:"BN59-01185B"});stockProducts.push({id:"15702",name:"کنترل هوشمند سامسونگ",stock:"False",price:" 390,000 تومان",sku:"BN59-01185BIR"});stockProducts.push({id:"15703",name:"کنترل هوشمند سامسونگ",stock:"False",price:" 780,000 تومان",sku:"BN59-01242A"});stockProducts.push({id:"15704",name:"کنترل هوشمند سامسونگ",stock:"True",price:" 850,000 تومان",sku:"BN59-01242AIR"});stockProducts.push({id:"16914",name:"RMCTPJ1AP2 کنترل هوشمند سامسونگ",stock:"True",price:" 780,000 تومان",sku:"BN59-01330C"});stockProducts.push({id:"16915",name:"RMCTPJ1AP2 کنترل هوشمند سامسونگ",stock:"False",price:" 450,000 تومان",sku:"BN59-01330CIR"});stockProducts.push({id:"16916",name:"RMCSPR1AP1 کنترل هوشمند سامسونگ",stock:"False",price:" 780,000 تومان",sku:"BN59-01220D"});stockProducts.push({id:"16917",name:"RMCSPR1AP1 کنترل هوشمند سامسونگ",stock:"False",price:" 650,000 تومان",sku:"BN59-01220DIR"});stockProducts.push({id:"25449",name:"کنترل هوشمند سامسونگ",stock:"True",price:" 950,000 تومان",sku:"BN59-01363H"});stockProducts.push({id:"25450",name:"کنترل هوشمند سامسونگ",stock:"False",price:" 480,000 تومان",sku:"BN59-01363HIR"});stockProducts.push({id:"28839",name:"کنترل هوشمند سامسونگ",stock:"True",price:" 780,000 تومان",sku:"BN59-01358GIR"});stockProducts.push({id:"28840",name:"کنترل هوشمند سامسونگ",stock:"False",price:" 1,380,000 تومان",sku:"BN59-01358G"});stockProducts.push({id:"29865",name:"BN59-01432E",stock:"False",price:" 850,000 تومان",sku:"BN59-01432EIR"});stockProducts.push({id:"29866",name:"BN59-01432E",stock:"True",price:" 1,550,000 تومان",sku:"BN59-01432E"});stockProducts.push({id:"29867",name:"BN59-01265A",stock:"True",price:" 1,350,000 تومان",sku:"BN59-01265AIR"});stockProducts.push({id:"29868",name:"BN59-01265A",stock:"False",price:" 2,500,000 تومان",sku:"BN59-01265A"});console.log(countt,"countt");getProductDetail("15701");console.log("BN59-01185B_selected:"+selectedSku,"BN59-01185B".indexOf(selectedSku));$("#div_15701").offset()!==undefined&&"BN59-01185B".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15701").offset().top-200},500);selectedSku!=null&&"BN59-01185B".indexOf(selectedSku)!=-1&&$("#div_15701").css("border-top","2px solid red");assocsitedProducts.push({id:"15701",name:"کنترل هوشمند سامسونگ",stock:"False",price:" 780,000 تومان",sku:"BN59-01185B"});console.log(countt,"countt");getProductDetail("15702");console.log("BN59-01185BIR_selected:"+selectedSku,"BN59-01185BIR".indexOf(selectedSku));$("#div_15701").offset()!==undefined&&"BN59-01185BIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15701").offset().top-200},500);selectedSku!=null&&"BN59-01185BIR".indexOf(selectedSku)!=-1&&$("#div_15701").css("border-top","2px solid red");p="BN59-01185B";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-15701][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15703");console.log("BN59-01242A_selected:"+selectedSku,"BN59-01242A".indexOf(selectedSku));$("#div_15703").offset()!==undefined&&"BN59-01242A".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15703").offset().top-200},500);selectedSku!=null&&"BN59-01242A".indexOf(selectedSku)!=-1&&$("#div_15703").css("border-top","2px solid red");assocsitedProducts.push({id:"15703",name:"کنترل هوشمند سامسونگ",stock:"False",price:" 780,000 تومان",sku:"BN59-01242A"});console.log(countt,"countt");getProductDetail("15704");console.log("BN59-01242AIR_selected:"+selectedSku,"BN59-01242AIR".indexOf(selectedSku));$("#div_15703").offset()!==undefined&&"BN59-01242AIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15703").offset().top-200},500);selectedSku!=null&&"BN59-01242AIR".indexOf(selectedSku)!=-1&&$("#div_15703").css("border-top","2px solid red");p="BN59-01242A";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-15703][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("16914");console.log("BN59-01330C_selected:"+selectedSku,"BN59-01330C".indexOf(selectedSku));$("#div_16914").offset()!==undefined&&"BN59-01330C".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_16914").offset().top-200},500);selectedSku!=null&&"BN59-01330C".indexOf(selectedSku)!=-1&&$("#div_16914").css("border-top","2px solid red");assocsitedProducts.push({id:"16914",name:"RMCTPJ1AP2 کنترل هوشمند سامسونگ",stock:"True",price:" 780,000 تومان",sku:"BN59-01330C"});$("input[name=radio-16914][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("16915");console.log("BN59-01330CIR_selected:"+selectedSku,"BN59-01330CIR".indexOf(selectedSku));$("#div_16914").offset()!==undefined&&"BN59-01330CIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_16914").offset().top-200},500);selectedSku!=null&&"BN59-01330CIR".indexOf(selectedSku)!=-1&&$("#div_16914").css("border-top","2px solid red");p="BN59-01330C";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-16914][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("16916");console.log("BN59-01220D_selected:"+selectedSku,"BN59-01220D".indexOf(selectedSku));$("#div_16916").offset()!==undefined&&"BN59-01220D".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_16916").offset().top-200},500);selectedSku!=null&&"BN59-01220D".indexOf(selectedSku)!=-1&&$("#div_16916").css("border-top","2px solid red");assocsitedProducts.push({id:"16916",name:"RMCSPR1AP1 کنترل هوشمند سامسونگ",stock:"False",price:" 780,000 تومان",sku:"BN59-01220D"});console.log(countt,"countt");getProductDetail("16917");console.log("BN59-01220DIR_selected:"+selectedSku,"BN59-01220DIR".indexOf(selectedSku));$("#div_16916").offset()!==undefined&&"BN59-01220DIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_16916").offset().top-200},500);selectedSku!=null&&"BN59-01220DIR".indexOf(selectedSku)!=-1&&$("#div_16916").css("border-top","2px solid red");p="BN59-01220D";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-16916][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("25449");console.log("BN59-01363H_selected:"+selectedSku,"BN59-01363H".indexOf(selectedSku));$("#div_25449").offset()!==undefined&&"BN59-01363H".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_25449").offset().top-200},500);selectedSku!=null&&"BN59-01363H".indexOf(selectedSku)!=-1&&$("#div_25449").css("border-top","2px solid red");assocsitedProducts.push({id:"25449",name:"کنترل هوشمند سامسونگ",stock:"True",price:" 950,000 تومان",sku:"BN59-01363H"});$("input[name=radio-25449][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("25450");console.log("BN59-01363HIR_selected:"+selectedSku,"BN59-01363HIR".indexOf(selectedSku));$("#div_25449").offset()!==undefined&&"BN59-01363HIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_25449").offset().top-200},500);selectedSku!=null&&"BN59-01363HIR".indexOf(selectedSku)!=-1&&$("#div_25449").css("border-top","2px solid red");p="BN59-01363H";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-25449][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("28839");console.log("BN59-01358GIR_selected:"+selectedSku,"BN59-01358GIR".indexOf(selectedSku));$("#div_28838").offset()!==undefined&&"BN59-01358GIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_28838").offset().top-200},500);selectedSku!=null&&"BN59-01358GIR".indexOf(selectedSku)!=-1&&$("#div_28838").css("border-top","2px solid red");p="BN59-01358G";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-28838][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("28840");console.log("BN59-01358G_selected:"+selectedSku,"BN59-01358G".indexOf(selectedSku));$("#div_28840").offset()!==undefined&&"BN59-01358G".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_28840").offset().top-200},500);selectedSku!=null&&"BN59-01358G".indexOf(selectedSku)!=-1&&$("#div_28840").css("border-top","2px solid red");assocsitedProducts.push({id:"28840",name:"کنترل هوشمند سامسونگ",stock:"False",price:" 1,380,000 تومان",sku:"BN59-01358G"});console.log(countt,"countt");getProductDetail("29865");console.log("BN59-01432EIR_selected:"+selectedSku,"BN59-01432EIR".indexOf(selectedSku));$("#div_29864").offset()!==undefined&&"BN59-01432EIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29864").offset().top-200},500);selectedSku!=null&&"BN59-01432EIR".indexOf(selectedSku)!=-1&&$("#div_29864").css("border-top","2px solid red");p="BN59-01432E";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-29864][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("29866");console.log("BN59-01432E_selected:"+selectedSku,"BN59-01432E".indexOf(selectedSku));$("#div_29866").offset()!==undefined&&"BN59-01432E".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29866").offset().top-200},500);selectedSku!=null&&"BN59-01432E".indexOf(selectedSku)!=-1&&$("#div_29866").css("border-top","2px solid red");assocsitedProducts.push({id:"29866",name:"BN59-01432E",stock:"True",price:" 1,550,000 تومان",sku:"BN59-01432E"});$("input[name=radio-29866][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("29867");console.log("BN59-01265AIR_selected:"+selectedSku,"BN59-01265AIR".indexOf(selectedSku));$("#div_29866").offset()!==undefined&&"BN59-01265AIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29866").offset().top-200},500);selectedSku!=null&&"BN59-01265AIR".indexOf(selectedSku)!=-1&&$("#div_29866").css("border-top","2px solid red");p="BN59-01265A";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-29866][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("29868");console.log("BN59-01265A_selected:"+selectedSku,"BN59-01265A".indexOf(selectedSku));$("#div_29868").offset()!==undefined&&"BN59-01265A".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29868").offset().top-200},500);selectedSku!=null&&"BN59-01265A".indexOf(selectedSku)!=-1&&$("#div_29868").css("border-top","2px solid red");assocsitedProducts.push({id:"29868",name:"BN59-01265A",stock:"False",price:" 2,500,000 تومان",sku:"BN59-01265A"});$(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()})})
| |