"+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:"15489",name:"عینک سه بعدی ال جی",stock:"False",price:" 60,000 تومان",sku:"EBX61268401"});stockProducts.push({id:"15490",name:"عینک سه بعدی ال جی AG-F200",stock:"True",price:" 60,000 تومان",sku:"EBX61508301"});stockProducts.push({id:"15491",name:"عینک سه بعدی ال جی AG-F200",stock:"False",price:" 30,000 تومان",sku:"EBX61508301IR"});stockProducts.push({id:"15492",name:"عینک سه بعدی ال جی",stock:"False",price:" 60,000 تومان",sku:"EBX61508303"});stockProducts.push({id:"15493",name:"عینک سه بعدی ال جی",stock:"False",price:" 30,000 تومان",sku:"EBX61508303IR"});stockProducts.push({id:"15494",name:"عینک سه بعدی ال جی AG-F215",stock:"True",price:" 120,000 تومان",sku:"EBX61509801"});stockProducts.push({id:"15495",name:"عینک سه بعدی ال جی AG-F220",stock:"True",price:" 100,000 تومان",sku:"EBX61528301"});stockProducts.push({id:"15496",name:"عینک سه بعدی ال جی AG-F310",stock:"True",price:" 60,000 تومان",sku:"EBX61648801"});stockProducts.push({id:"15497",name:"عینک سه بعدی ال جی AG-F310[X2]",stock:"True",price:" 60,000 تومان",sku:"EBX61668501"});stockProducts.push({id:"15498",name:"عینک سه بعدی ال جی AG-F310[X2]",stock:"False",price:" 30,000 تومان",sku:"EBX61668501IR"});stockProducts.push({id:"15499",name:"عینک سه بعدی ال جی AG-F310[X4]",stock:"True",price:" 200,000 تومان",sku:"EBX61668503"});stockProducts.push({id:"15500",name:"عینک سه بعدی ال جی AG-F310[X4]",stock:"False",price:" 30,000 تومان",sku:"EBX61668503IR"});stockProducts.push({id:"15501",name:"عینک سه بعدی ال جی AG-F310[X1]",stock:"True",price:" 60,000 تومان",sku:"EBX61668505"});stockProducts.push({id:"15502",name:"عینک سه بعدی ال جی AG-F400DP",stock:"False",price:" 60,000 تومان",sku:"EBX61888301"});stockProducts.push({id:"15503",name:"عینک سه بعدی ال جی",stock:"False",price:" 60,000 تومان",sku:"EBX62248601"});stockProducts.push({id:"15504",name:"عینک سه بعدی ال جی",stock:"False",price:" 30,000 تومان",sku:"EBX62248601IR"});console.log(countt,"countt");getProductDetail("15489");console.log("EBX61268401_selected:"+selectedSku,"EBX61268401".indexOf(selectedSku));$("#div_15489").offset()!==undefined&&"EBX61268401".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15489").offset().top-200},500);selectedSku!=null&&"EBX61268401".indexOf(selectedSku)!=-1&&$("#div_15489").css("border-top","2px solid red");assocsitedProducts.push({id:"15489",name:"عینک سه بعدی ال جی",stock:"False",price:" 60,000 تومان",sku:"EBX61268401"});console.log(countt,"countt");getProductDetail("15490");console.log("EBX61508301_selected:"+selectedSku,"EBX61508301".indexOf(selectedSku));$("#div_15490").offset()!==undefined&&"EBX61508301".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15490").offset().top-200},500);selectedSku!=null&&"EBX61508301".indexOf(selectedSku)!=-1&&$("#div_15490").css("border-top","2px solid red");assocsitedProducts.push({id:"15490",name:"عینک سه بعدی ال جی AG-F200",stock:"True",price:" 60,000 تومان",sku:"EBX61508301"});$("input[name=radio-15490][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15491");console.log("EBX61508301IR_selected:"+selectedSku,"EBX61508301IR".indexOf(selectedSku));$("#div_15490").offset()!==undefined&&"EBX61508301IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15490").offset().top-200},500);selectedSku!=null&&"EBX61508301IR".indexOf(selectedSku)!=-1&&$("#div_15490").css("border-top","2px solid red");p="EBX61508301";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-15490][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15492");console.log("EBX61508303_selected:"+selectedSku,"EBX61508303".indexOf(selectedSku));$("#div_15492").offset()!==undefined&&"EBX61508303".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15492").offset().top-200},500);selectedSku!=null&&"EBX61508303".indexOf(selectedSku)!=-1&&$("#div_15492").css("border-top","2px solid red");assocsitedProducts.push({id:"15492",name:"عینک سه بعدی ال جی",stock:"False",price:" 60,000 تومان",sku:"EBX61508303"});console.log(countt,"countt");getProductDetail("15493");console.log("EBX61508303IR_selected:"+selectedSku,"EBX61508303IR".indexOf(selectedSku));$("#div_15492").offset()!==undefined&&"EBX61508303IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15492").offset().top-200},500);selectedSku!=null&&"EBX61508303IR".indexOf(selectedSku)!=-1&&$("#div_15492").css("border-top","2px solid red");p="EBX61508303";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-15492][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15494");console.log("EBX61509801_selected:"+selectedSku,"EBX61509801".indexOf(selectedSku));$("#div_15494").offset()!==undefined&&"EBX61509801".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15494").offset().top-200},500);selectedSku!=null&&"EBX61509801".indexOf(selectedSku)!=-1&&$("#div_15494").css("border-top","2px solid red");assocsitedProducts.push({id:"15494",name:"عینک سه بعدی ال جی AG-F215",stock:"True",price:" 120,000 تومان",sku:"EBX61509801"});$("input[name=radio-15494][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15495");console.log("EBX61528301_selected:"+selectedSku,"EBX61528301".indexOf(selectedSku));$("#div_15495").offset()!==undefined&&"EBX61528301".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15495").offset().top-200},500);selectedSku!=null&&"EBX61528301".indexOf(selectedSku)!=-1&&$("#div_15495").css("border-top","2px solid red");assocsitedProducts.push({id:"15495",name:"عینک سه بعدی ال جی AG-F220",stock:"True",price:" 100,000 تومان",sku:"EBX61528301"});$("input[name=radio-15495][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15496");console.log("EBX61648801_selected:"+selectedSku,"EBX61648801".indexOf(selectedSku));$("#div_15496").offset()!==undefined&&"EBX61648801".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15496").offset().top-200},500);selectedSku!=null&&"EBX61648801".indexOf(selectedSku)!=-1&&$("#div_15496").css("border-top","2px solid red");assocsitedProducts.push({id:"15496",name:"عینک سه بعدی ال جی AG-F310",stock:"True",price:" 60,000 تومان",sku:"EBX61648801"});$("input[name=radio-15496][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15497");console.log("EBX61668501_selected:"+selectedSku,"EBX61668501".indexOf(selectedSku));$("#div_15497").offset()!==undefined&&"EBX61668501".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15497").offset().top-200},500);selectedSku!=null&&"EBX61668501".indexOf(selectedSku)!=-1&&$("#div_15497").css("border-top","2px solid red");assocsitedProducts.push({id:"15497",name:"عینک سه بعدی ال جی AG-F310[X2]",stock:"True",price:" 60,000 تومان",sku:"EBX61668501"});$("input[name=radio-15497][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15498");console.log("EBX61668501IR_selected:"+selectedSku,"EBX61668501IR".indexOf(selectedSku));$("#div_15497").offset()!==undefined&&"EBX61668501IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15497").offset().top-200},500);selectedSku!=null&&"EBX61668501IR".indexOf(selectedSku)!=-1&&$("#div_15497").css("border-top","2px solid red");p="EBX61668501";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-15497][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15499");console.log("EBX61668503_selected:"+selectedSku,"EBX61668503".indexOf(selectedSku));$("#div_15499").offset()!==undefined&&"EBX61668503".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15499").offset().top-200},500);selectedSku!=null&&"EBX61668503".indexOf(selectedSku)!=-1&&$("#div_15499").css("border-top","2px solid red");assocsitedProducts.push({id:"15499",name:"عینک سه بعدی ال جی AG-F310[X4]",stock:"True",price:" 200,000 تومان",sku:"EBX61668503"});$("input[name=radio-15499][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15500");console.log("EBX61668503IR_selected:"+selectedSku,"EBX61668503IR".indexOf(selectedSku));$("#div_15499").offset()!==undefined&&"EBX61668503IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15499").offset().top-200},500);selectedSku!=null&&"EBX61668503IR".indexOf(selectedSku)!=-1&&$("#div_15499").css("border-top","2px solid red");p="EBX61668503";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-15499][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15501");console.log("EBX61668505_selected:"+selectedSku,"EBX61668505".indexOf(selectedSku));$("#div_15501").offset()!==undefined&&"EBX61668505".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15501").offset().top-200},500);selectedSku!=null&&"EBX61668505".indexOf(selectedSku)!=-1&&$("#div_15501").css("border-top","2px solid red");assocsitedProducts.push({id:"15501",name:"عینک سه بعدی ال جی AG-F310[X1]",stock:"True",price:" 60,000 تومان",sku:"EBX61668505"});$("input[name=radio-15501][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("15502");console.log("EBX61888301_selected:"+selectedSku,"EBX61888301".indexOf(selectedSku));$("#div_15502").offset()!==undefined&&"EBX61888301".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15502").offset().top-200},500);selectedSku!=null&&"EBX61888301".indexOf(selectedSku)!=-1&&$("#div_15502").css("border-top","2px solid red");assocsitedProducts.push({id:"15502",name:"عینک سه بعدی ال جی AG-F400DP",stock:"False",price:" 60,000 تومان",sku:"EBX61888301"});console.log(countt,"countt");getProductDetail("15503");console.log("EBX62248601_selected:"+selectedSku,"EBX62248601".indexOf(selectedSku));$("#div_15503").offset()!==undefined&&"EBX62248601".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15503").offset().top-200},500);selectedSku!=null&&"EBX62248601".indexOf(selectedSku)!=-1&&$("#div_15503").css("border-top","2px solid red");assocsitedProducts.push({id:"15503",name:"عینک سه بعدی ال جی",stock:"False",price:" 60,000 تومان",sku:"EBX62248601"});console.log(countt,"countt");getProductDetail("15504");console.log("EBX62248601IR_selected:"+selectedSku,"EBX62248601IR".indexOf(selectedSku));$("#div_15503").offset()!==undefined&&"EBX62248601IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_15503").offset().top-200},500);selectedSku!=null&&"EBX62248601IR".indexOf(selectedSku)!=-1&&$("#div_15503").css("border-top","2px solid red");p="EBX62248601";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-15503][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()})})
| |