"+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:"13674",name:"پنل تلویزیون 49 ال جی-FHD",stock:"False",price:" تومان",sku:"TFT49FHD001"});stockProducts.push({id:"13675",name:"پنل تلویزیون 49 ال جی-4K",stock:"False",price:" تومان",sku:"TFT49UHD001"});stockProducts.push({id:"26074",name:"پنل تلویزیون 49 ال جی-4K-دو فلت",stock:"False",price:" تومان",sku:"TFT49UHDLGD02"});stockProducts.push({id:"27527",name:"پنل تلویزیون 49 ال جی-4K",stock:"False",price:" تومان",sku:"TFT49UHD001IR"});stockProducts.push({id:"28282",name:"پنل تلویزیون 49 ال جی",stock:"False",price:" تومان",sku:"LC490DUJ-FJA1"});stockProducts.push({id:"28500",name:"پنل تلویزیون 49 ال جی",stock:"True",price:" تومان",sku:"HV490FHB-N80"});stockProducts.push({id:"29402",name:"پنل تلویزیون 49 الجی",stock:"False",price:" تومان",sku:"HV490QUB-B20"});stockProducts.push({id:"29777",name:"پنل تلویزیون 49 ال جی",stock:"False",price:" تومان",sku:"LC490DUY-SHA3"});stockProducts.push({id:"29956",name:"پنل تلویزیون 49 ال جی",stock:"True",price:" تومان",sku:"LC490DGJ-SLA2"});stockProducts.push({id:"31033",name:"پنل تلویزیون 49 ال جی",stock:"True",price:" تومان",sku:"LC490DGY-SLA1"});console.log(countt,"countt");getProductDetail("13674");console.log("TFT49FHD001_selected:"+selectedSku,"TFT49FHD001".indexOf(selectedSku));$("#div_13674").offset()!==undefined&&"TFT49FHD001".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13674").offset().top-200},500);selectedSku!=null&&"TFT49FHD001".indexOf(selectedSku)!=-1&&$("#div_13674").css("border-top","2px solid red");assocsitedProducts.push({id:"13674",name:"پنل تلویزیون 49 ال جی-FHD",stock:"False",price:" تومان",sku:"TFT49FHD001"});console.log(countt,"countt");getProductDetail("13675");console.log("TFT49UHD001_selected:"+selectedSku,"TFT49UHD001".indexOf(selectedSku));$("#div_13675").offset()!==undefined&&"TFT49UHD001".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13675").offset().top-200},500);selectedSku!=null&&"TFT49UHD001".indexOf(selectedSku)!=-1&&$("#div_13675").css("border-top","2px solid red");assocsitedProducts.push({id:"13675",name:"پنل تلویزیون 49 ال جی-4K",stock:"False",price:" تومان",sku:"TFT49UHD001"});console.log(countt,"countt");getProductDetail("26074");console.log("TFT49UHDLGD02_selected:"+selectedSku,"TFT49UHDLGD02".indexOf(selectedSku));$("#div_26074").offset()!==undefined&&"TFT49UHDLGD02".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_26074").offset().top-200},500);selectedSku!=null&&"TFT49UHDLGD02".indexOf(selectedSku)!=-1&&$("#div_26074").css("border-top","2px solid red");assocsitedProducts.push({id:"26074",name:"پنل تلویزیون 49 ال جی-4K-دو فلت",stock:"False",price:" تومان",sku:"TFT49UHDLGD02"});console.log(countt,"countt");getProductDetail("27527");console.log("TFT49UHD001IR_selected:"+selectedSku,"TFT49UHD001IR".indexOf(selectedSku));$("#div_27526").offset()!==undefined&&"TFT49UHD001IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_27526").offset().top-200},500);selectedSku!=null&&"TFT49UHD001IR".indexOf(selectedSku)!=-1&&$("#div_27526").css("border-top","2px solid red");p="TFT49UHD001";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-27526][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("28282");console.log("LC490DUJ-FJA1_selected:"+selectedSku,"LC490DUJ-FJA1".indexOf(selectedSku));$("#div_28282").offset()!==undefined&&"LC490DUJ-FJA1".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_28282").offset().top-200},500);selectedSku!=null&&"LC490DUJ-FJA1".indexOf(selectedSku)!=-1&&$("#div_28282").css("border-top","2px solid red");assocsitedProducts.push({id:"28282",name:"پنل تلویزیون 49 ال جی",stock:"False",price:" تومان",sku:"LC490DUJ-FJA1"});console.log(countt,"countt");getProductDetail("28500");console.log("HV490FHB-N80_selected:"+selectedSku,"HV490FHB-N80".indexOf(selectedSku));$("#div_28500").offset()!==undefined&&"HV490FHB-N80".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_28500").offset().top-200},500);selectedSku!=null&&"HV490FHB-N80".indexOf(selectedSku)!=-1&&$("#div_28500").css("border-top","2px solid red");assocsitedProducts.push({id:"28500",name:"پنل تلویزیون 49 ال جی",stock:"True",price:" تومان",sku:"HV490FHB-N80"});$("input[name=radio-28500][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("29402");console.log("HV490QUB-B20_selected:"+selectedSku,"HV490QUB-B20".indexOf(selectedSku));$("#div_29402").offset()!==undefined&&"HV490QUB-B20".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29402").offset().top-200},500);selectedSku!=null&&"HV490QUB-B20".indexOf(selectedSku)!=-1&&$("#div_29402").css("border-top","2px solid red");assocsitedProducts.push({id:"29402",name:"پنل تلویزیون 49 الجی",stock:"False",price:" تومان",sku:"HV490QUB-B20"});console.log(countt,"countt");getProductDetail("29777");console.log("LC490DUY-SHA3_selected:"+selectedSku,"LC490DUY-SHA3".indexOf(selectedSku));$("#div_29777").offset()!==undefined&&"LC490DUY-SHA3".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29777").offset().top-200},500);selectedSku!=null&&"LC490DUY-SHA3".indexOf(selectedSku)!=-1&&$("#div_29777").css("border-top","2px solid red");assocsitedProducts.push({id:"29777",name:"پنل تلویزیون 49 ال جی",stock:"False",price:" تومان",sku:"LC490DUY-SHA3"});console.log(countt,"countt");getProductDetail("29956");console.log("LC490DGJ-SLA2_selected:"+selectedSku,"LC490DGJ-SLA2".indexOf(selectedSku));$("#div_29956").offset()!==undefined&&"LC490DGJ-SLA2".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29956").offset().top-200},500);selectedSku!=null&&"LC490DGJ-SLA2".indexOf(selectedSku)!=-1&&$("#div_29956").css("border-top","2px solid red");assocsitedProducts.push({id:"29956",name:"پنل تلویزیون 49 ال جی",stock:"True",price:" تومان",sku:"LC490DGJ-SLA2"});$("input[name=radio-29956][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("31033");console.log("LC490DGY-SLA1_selected:"+selectedSku,"LC490DGY-SLA1".indexOf(selectedSku));$("#div_31033").offset()!==undefined&&"LC490DGY-SLA1".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_31033").offset().top-200},500);selectedSku!=null&&"LC490DGY-SLA1".indexOf(selectedSku)!=-1&&$("#div_31033").css("border-top","2px solid red");assocsitedProducts.push({id:"31033",name:"پنل تلویزیون 49 ال جی",stock:"True",price:" تومان",sku:"LC490DGY-SLA1"});$("input[name=radio-31033][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()})})
| |