"+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="10";i=1;stockProducts.push({id:"14100",name:"EBU61004701",stock:"False",price:" 770,000 تومان",sku:"EBU61004701"});stockProducts.push({id:"14101",name:"EBU61004701",stock:"False",price:" 380,000 تومان",sku:"EBU61004701IR"});stockProducts.push({id:"14102",name:"EBU61123101",stock:"False",price:" 880,000 تومان",sku:"EBU61123101"});stockProducts.push({id:"14103",name:"EBU61123101",stock:"False",price:" 480,000 تومان",sku:"EBU61123101IR"});stockProducts.push({id:"14104",name:"EBU61124001",stock:"False",price:" 1,360,000 تومان",sku:"EBU61124001"});stockProducts.push({id:"14105",name:"EBU61124001",stock:"False",price:" 680,000 تومان",sku:"EBU61124001IR"});stockProducts.push({id:"14106",name:"EBU61124002",stock:"False",price:" 1,360,000 تومان",sku:"EBU61124002"});stockProducts.push({id:"14107",name:"EBU61124002",stock:"False",price:" 680,000 تومان",sku:"EBU61124002IR"});stockProducts.push({id:"14108",name:"LA02M",stock:"False",price:" 430,000 تومان",sku:"LA02M"});stockProducts.push({id:"14109",name:"LA02M",stock:"False",price:" 330,000 تومان",sku:"LA02MIR"});console.log(countt,"countt");getProductDetail("14100");console.log("EBU61004701_selected:"+selectedSku,"EBU61004701".indexOf(selectedSku));$("#div_14100").offset()!==undefined&&"EBU61004701".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14100").offset().top-200},500);selectedSku!=null&&"EBU61004701".indexOf(selectedSku)!=-1&&$("#div_14100").css("border-top","2px solid red");assocsitedProducts.push({id:"14100",name:"EBU61004701",stock:"False",price:" 770,000 تومان",sku:"EBU61004701"});console.log(countt,"countt");getProductDetail("14101");console.log("EBU61004701IR_selected:"+selectedSku,"EBU61004701IR".indexOf(selectedSku));$("#div_14100").offset()!==undefined&&"EBU61004701IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14100").offset().top-200},500);selectedSku!=null&&"EBU61004701IR".indexOf(selectedSku)!=-1&&$("#div_14100").css("border-top","2px solid red");p="EBU61004701";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-14100][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("14102");console.log("EBU61123101_selected:"+selectedSku,"EBU61123101".indexOf(selectedSku));$("#div_14102").offset()!==undefined&&"EBU61123101".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14102").offset().top-200},500);selectedSku!=null&&"EBU61123101".indexOf(selectedSku)!=-1&&$("#div_14102").css("border-top","2px solid red");assocsitedProducts.push({id:"14102",name:"EBU61123101",stock:"False",price:" 880,000 تومان",sku:"EBU61123101"});console.log(countt,"countt");getProductDetail("14103");console.log("EBU61123101IR_selected:"+selectedSku,"EBU61123101IR".indexOf(selectedSku));$("#div_14102").offset()!==undefined&&"EBU61123101IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14102").offset().top-200},500);selectedSku!=null&&"EBU61123101IR".indexOf(selectedSku)!=-1&&$("#div_14102").css("border-top","2px solid red");p="EBU61123101";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-14102][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("14104");console.log("EBU61124001_selected:"+selectedSku,"EBU61124001".indexOf(selectedSku));$("#div_14104").offset()!==undefined&&"EBU61124001".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14104").offset().top-200},500);selectedSku!=null&&"EBU61124001".indexOf(selectedSku)!=-1&&$("#div_14104").css("border-top","2px solid red");assocsitedProducts.push({id:"14104",name:"EBU61124001",stock:"False",price:" 1,360,000 تومان",sku:"EBU61124001"});console.log(countt,"countt");getProductDetail("14105");console.log("EBU61124001IR_selected:"+selectedSku,"EBU61124001IR".indexOf(selectedSku));$("#div_14104").offset()!==undefined&&"EBU61124001IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14104").offset().top-200},500);selectedSku!=null&&"EBU61124001IR".indexOf(selectedSku)!=-1&&$("#div_14104").css("border-top","2px solid red");p="EBU61124001";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-14104][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("14106");console.log("EBU61124002_selected:"+selectedSku,"EBU61124002".indexOf(selectedSku));$("#div_14106").offset()!==undefined&&"EBU61124002".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14106").offset().top-200},500);selectedSku!=null&&"EBU61124002".indexOf(selectedSku)!=-1&&$("#div_14106").css("border-top","2px solid red");assocsitedProducts.push({id:"14106",name:"EBU61124002",stock:"False",price:" 1,360,000 تومان",sku:"EBU61124002"});console.log(countt,"countt");getProductDetail("14107");console.log("EBU61124002IR_selected:"+selectedSku,"EBU61124002IR".indexOf(selectedSku));$("#div_14106").offset()!==undefined&&"EBU61124002IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14106").offset().top-200},500);selectedSku!=null&&"EBU61124002IR".indexOf(selectedSku)!=-1&&$("#div_14106").css("border-top","2px solid red");p="EBU61124002";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-14106][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("14108");console.log("LA02M_selected:"+selectedSku,"LA02M".indexOf(selectedSku));$("#div_14108").offset()!==undefined&&"LA02M".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14108").offset().top-200},500);selectedSku!=null&&"LA02M".indexOf(selectedSku)!=-1&&$("#div_14108").css("border-top","2px solid red");assocsitedProducts.push({id:"14108",name:"LA02M",stock:"False",price:" 430,000 تومان",sku:"LA02M"});console.log(countt,"countt");getProductDetail("14109");console.log("LA02MIR_selected:"+selectedSku,"LA02MIR".indexOf(selectedSku));$("#div_14108").offset()!==undefined&&"LA02MIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_14108").offset().top-200},500);selectedSku!=null&&"LA02MIR".indexOf(selectedSku)!=-1&&$("#div_14108").css("border-top","2px solid red");p="LA02M";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-14108][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()})})
| |