"+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;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="7";i=1;stockProducts.push({id:"6965",name:"آنتن رومیزی طرح 90",stock:"False",price:" 90,000 تومان",sku:"ANTDGHD9001"});stockProducts.push({id:"6966",name:"آنتن رومیزی طرح بنز",stock:"False",price:" 90,000 تومان",sku:"ANTDGHDB001"});stockProducts.push({id:"6967",name:"آنتن رومیزی طرح هیوندا",stock:"False",price:" 55,000 تومان",sku:"ANTDGHDH001"});stockProducts.push({id:"6968",name:"آنتن رومیزی جی پلاس",stock:"False",price:" 125,000 تومان",sku:"ANTDGPLUS01"});stockProducts.push({id:"6969",name:"آنتن رومیزی امین تک فنره بزرگ",stock:"False",price:" 40,000 تومان",sku:"ANTDVB0001B"});stockProducts.push({id:"6970",name:"آنتن رومیزی امین تک فنره کوچک",stock:"True",price:" 25,000 تومان",sku:"ANTDVB0001S"});stockProducts.push({id:"6971",name:"آنتن رومیزی امین دو فنره بزرگ",stock:"False",price:" 45,000 تومان",sku:"ANTDVB0002B"});console.log(countt,"countt");getProductDetail("6965");console.log("ANTDGHD9001_selected:"+selectedSku,"ANTDGHD9001".indexOf(selectedSku));$("#div_6965").offset()!==undefined&&"ANTDGHD9001".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_6965").offset().top-200},500);selectedSku!=null&&"ANTDGHD9001".indexOf(selectedSku)!=-1&&$("#div_6965").css("border-top","2px solid red");assocsitedProducts.push({id:"6965",name:"آنتن رومیزی طرح 90",stock:"False",price:" 90,000 تومان",sku:"ANTDGHD9001"});console.log(countt,"countt");getProductDetail("6966");console.log("ANTDGHDB001_selected:"+selectedSku,"ANTDGHDB001".indexOf(selectedSku));$("#div_6966").offset()!==undefined&&"ANTDGHDB001".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_6966").offset().top-200},500);selectedSku!=null&&"ANTDGHDB001".indexOf(selectedSku)!=-1&&$("#div_6966").css("border-top","2px solid red");assocsitedProducts.push({id:"6966",name:"آنتن رومیزی طرح بنز",stock:"False",price:" 90,000 تومان",sku:"ANTDGHDB001"});console.log(countt,"countt");getProductDetail("6967");console.log("ANTDGHDH001_selected:"+selectedSku,"ANTDGHDH001".indexOf(selectedSku));$("#div_6967").offset()!==undefined&&"ANTDGHDH001".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_6967").offset().top-200},500);selectedSku!=null&&"ANTDGHDH001".indexOf(selectedSku)!=-1&&$("#div_6967").css("border-top","2px solid red");assocsitedProducts.push({id:"6967",name:"آنتن رومیزی طرح هیوندا",stock:"False",price:" 55,000 تومان",sku:"ANTDGHDH001"});console.log(countt,"countt");getProductDetail("6968");console.log("ANTDGPLUS01_selected:"+selectedSku,"ANTDGPLUS01".indexOf(selectedSku));$("#div_6968").offset()!==undefined&&"ANTDGPLUS01".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_6968").offset().top-200},500);selectedSku!=null&&"ANTDGPLUS01".indexOf(selectedSku)!=-1&&$("#div_6968").css("border-top","2px solid red");assocsitedProducts.push({id:"6968",name:"آنتن رومیزی جی پلاس",stock:"False",price:" 125,000 تومان",sku:"ANTDGPLUS01"});console.log(countt,"countt");getProductDetail("6969");console.log("ANTDVB0001B_selected:"+selectedSku,"ANTDVB0001B".indexOf(selectedSku));$("#div_6969").offset()!==undefined&&"ANTDVB0001B".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_6969").offset().top-200},500);selectedSku!=null&&"ANTDVB0001B".indexOf(selectedSku)!=-1&&$("#div_6969").css("border-top","2px solid red");assocsitedProducts.push({id:"6969",name:"آنتن رومیزی امین تک فنره بزرگ",stock:"False",price:" 40,000 تومان",sku:"ANTDVB0001B"});console.log(countt,"countt");getProductDetail("6970");console.log("ANTDVB0001S_selected:"+selectedSku,"ANTDVB0001S".indexOf(selectedSku));$("#div_6970").offset()!==undefined&&"ANTDVB0001S".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_6970").offset().top-200},500);selectedSku!=null&&"ANTDVB0001S".indexOf(selectedSku)!=-1&&$("#div_6970").css("border-top","2px solid red");assocsitedProducts.push({id:"6970",name:"آنتن رومیزی امین تک فنره کوچک",stock:"True",price:" 25,000 تومان",sku:"ANTDVB0001S"});$("input[name=radio-6970][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("6971");console.log("ANTDVB0002B_selected:"+selectedSku,"ANTDVB0002B".indexOf(selectedSku));$("#div_6971").offset()!==undefined&&"ANTDVB0002B".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_6971").offset().top-200},500);selectedSku!=null&&"ANTDVB0002B".indexOf(selectedSku)!=-1&&$("#div_6971").css("border-top","2px solid red");assocsitedProducts.push({id:"6971",name:"آنتن رومیزی امین دو فنره بزرگ",stock:"False",price:" 45,000 تومان",sku:"ANTDVB0002B"});$(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()})})
| |