"+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:"15573",name:"کابل HDMI طول 1.5 متری",stock:"False",price:" 45,000 تومان",sku:"EADHDMI1.5M"});stockProducts.push({id:"15574",name:"کابل HDMI انتقال دهنده مستقیم",stock:"True",price:" 15,000 تومان",sku:"EADHDMICONV"});stockProducts.push({id:"15575",name:"کابل HDMI انتقال دهنده 90 درجه",stock:"True",price:" 10,000 تومان",sku:"EADHEHDM1T1"});stockProducts.push({id:"15576",name:"کابل HDMI طول 2 متری",stock:"False",price:" 40,000 تومان",sku:"EADHEHDMI2M"});stockProducts.push({id:"15577",name:"کابل HDMI طول 3 متری",stock:"False",price:" 60,000 تومان",sku:"EADHEHDMI3M"});stockProducts.push({id:"15578",name:"کابل HDMI طول 5 متری",stock:"False",price:" 100,000 تومان",sku:"EADHEHDMI5M"});stockProducts.push({id:"26753",name:"کابل HDMI طول 3.5 متری",stock:"False",price:" 250,000 تومان",sku:"EADHDMI3.5M"});console.log(countt,"countt");getProductDetail("15573");console.log("EADHDMI1.5M_selected:"+selectedSku,"EADHDMI1.5M".indexOf(selectedSku));$("#div_15573").offset()!==undefined&&"EADHDMI1.5M".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15573").offset().top-200},500);selectedSku!=null&&"EADHDMI1.5M".indexOf(selectedSku)!=-1&&$("#div_15573").css("border-top","2px solid red");assocsitedProducts.push({id:"15573",name:"کابل HDMI طول 1.5 متری",stock:"False",price:" 45,000 تومان",sku:"EADHDMI1.5M"});console.log(countt,"countt");getProductDetail("15574");console.log("EADHDMICONV_selected:"+selectedSku,"EADHDMICONV".indexOf(selectedSku));$("#div_15574").offset()!==undefined&&"EADHDMICONV".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15574").offset().top-200},500);selectedSku!=null&&"EADHDMICONV".indexOf(selectedSku)!=-1&&$("#div_15574").css("border-top","2px solid red");assocsitedProducts.push({id:"15574",name:"کابل HDMI انتقال دهنده مستقیم",stock:"True",price:" 15,000 تومان",sku:"EADHDMICONV"});$("input[name=radio-15574][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15575");console.log("EADHEHDM1T1_selected:"+selectedSku,"EADHEHDM1T1".indexOf(selectedSku));$("#div_15575").offset()!==undefined&&"EADHEHDM1T1".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15575").offset().top-200},500);selectedSku!=null&&"EADHEHDM1T1".indexOf(selectedSku)!=-1&&$("#div_15575").css("border-top","2px solid red");assocsitedProducts.push({id:"15575",name:"کابل HDMI انتقال دهنده 90 درجه",stock:"True",price:" 10,000 تومان",sku:"EADHEHDM1T1"});$("input[name=radio-15575][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15576");console.log("EADHEHDMI2M_selected:"+selectedSku,"EADHEHDMI2M".indexOf(selectedSku));$("#div_15576").offset()!==undefined&&"EADHEHDMI2M".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15576").offset().top-200},500);selectedSku!=null&&"EADHEHDMI2M".indexOf(selectedSku)!=-1&&$("#div_15576").css("border-top","2px solid red");assocsitedProducts.push({id:"15576",name:"کابل HDMI طول 2 متری",stock:"False",price:" 40,000 تومان",sku:"EADHEHDMI2M"});console.log(countt,"countt");getProductDetail("15577");console.log("EADHEHDMI3M_selected:"+selectedSku,"EADHEHDMI3M".indexOf(selectedSku));$("#div_15577").offset()!==undefined&&"EADHEHDMI3M".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15577").offset().top-200},500);selectedSku!=null&&"EADHEHDMI3M".indexOf(selectedSku)!=-1&&$("#div_15577").css("border-top","2px solid red");assocsitedProducts.push({id:"15577",name:"کابل HDMI طول 3 متری",stock:"False",price:" 60,000 تومان",sku:"EADHEHDMI3M"});console.log(countt,"countt");getProductDetail("15578");console.log("EADHEHDMI5M_selected:"+selectedSku,"EADHEHDMI5M".indexOf(selectedSku));$("#div_15578").offset()!==undefined&&"EADHEHDMI5M".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15578").offset().top-200},500);selectedSku!=null&&"EADHEHDMI5M".indexOf(selectedSku)!=-1&&$("#div_15578").css("border-top","2px solid red");assocsitedProducts.push({id:"15578",name:"کابل HDMI طول 5 متری",stock:"False",price:" 100,000 تومان",sku:"EADHEHDMI5M"});console.log(countt,"countt");getProductDetail("26753");console.log("EADHDMI3.5M_selected:"+selectedSku,"EADHDMI3.5M".indexOf(selectedSku));$("#div_26753").offset()!==undefined&&"EADHDMI3.5M".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26753").offset().top-200},500);selectedSku!=null&&"EADHDMI3.5M".indexOf(selectedSku)!=-1&&$("#div_26753").css("border-top","2px solid red");assocsitedProducts.push({id:"26753",name:"کابل HDMI طول 3.5 متری",stock:"False",price:" 250,000 تومان",sku:"EADHDMI3.5M"});$(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()})})
| |