"+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="15";i=1;stockProducts.push({id:"25154",name:"پنل تلویزیون 65 ال جی-4K",stock:"False",price:" تومان",sku:"TFT65UHD001"});stockProducts.push({id:"25928",name:"پنل تلویزیون 65 ال جی-4K تک فلت",stock:"False",price:" تومان",sku:"TFT65UHDFL1"});stockProducts.push({id:"27030",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"HV650QUB-E9D"});stockProducts.push({id:"27031",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"LC650EQP-SPA1"});stockProducts.push({id:"28283",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"LC650EQQ-SMA3"});stockProducts.push({id:"28711",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"HV650QUB-N9E"});stockProducts.push({id:"28952",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"HV650QUB-F70"});stockProducts.push({id:"28953",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"LC650EGY-SMM3"});stockProducts.push({id:"29397",name:"پنل تلویزیون 65 الجی",stock:"True",price:" تومان",sku:"HV650QUB-E9E"});stockProducts.push({id:"29961",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"HV650QUB-F9L"});stockProducts.push({id:"29962",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"LC650DQJ-SMA1"});stockProducts.push({id:"31028",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"HV650QUB-N9EIR"});stockProducts.push({id:"31030",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"HV650QUB-F70IR"});stockProducts.push({id:"31036",name:"پنل تلویزیون 65",stock:"False",price:" تومان",sku:"HV650QUB-N90"});stockProducts.push({id:"31037",name:"پنل تلویزیون 65",stock:"False",price:" تومان",sku:"HV650QUB-N90IR"});console.log(countt,"countt");getProductDetail("25154");console.log("TFT65UHD001_selected:"+selectedSku,"TFT65UHD001".indexOf(selectedSku));$("#div_25154").offset()!==undefined&&"TFT65UHD001".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_25154").offset().top-200},500);selectedSku!=null&&"TFT65UHD001".indexOf(selectedSku)!=-1&&$("#div_25154").css("border-top","2px solid red");assocsitedProducts.push({id:"25154",name:"پنل تلویزیون 65 ال جی-4K",stock:"False",price:" تومان",sku:"TFT65UHD001"});console.log(countt,"countt");getProductDetail("25928");console.log("TFT65UHDFL1_selected:"+selectedSku,"TFT65UHDFL1".indexOf(selectedSku));$("#div_25928").offset()!==undefined&&"TFT65UHDFL1".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_25928").offset().top-200},500);selectedSku!=null&&"TFT65UHDFL1".indexOf(selectedSku)!=-1&&$("#div_25928").css("border-top","2px solid red");assocsitedProducts.push({id:"25928",name:"پنل تلویزیون 65 ال جی-4K تک فلت",stock:"False",price:" تومان",sku:"TFT65UHDFL1"});console.log(countt,"countt");getProductDetail("27030");console.log("HV650QUB-E9D_selected:"+selectedSku,"HV650QUB-E9D".indexOf(selectedSku));$("#div_27030").offset()!==undefined&&"HV650QUB-E9D".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_27030").offset().top-200},500);selectedSku!=null&&"HV650QUB-E9D".indexOf(selectedSku)!=-1&&$("#div_27030").css("border-top","2px solid red");assocsitedProducts.push({id:"27030",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"HV650QUB-E9D"});$("input[name=radio-27030][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("27031");console.log("LC650EQP-SPA1_selected:"+selectedSku,"LC650EQP-SPA1".indexOf(selectedSku));$("#div_27031").offset()!==undefined&&"LC650EQP-SPA1".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_27031").offset().top-200},500);selectedSku!=null&&"LC650EQP-SPA1".indexOf(selectedSku)!=-1&&$("#div_27031").css("border-top","2px solid red");assocsitedProducts.push({id:"27031",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"LC650EQP-SPA1"});console.log(countt,"countt");getProductDetail("28283");console.log("LC650EQQ-SMA3_selected:"+selectedSku,"LC650EQQ-SMA3".indexOf(selectedSku));$("#div_28283").offset()!==undefined&&"LC650EQQ-SMA3".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_28283").offset().top-200},500);selectedSku!=null&&"LC650EQQ-SMA3".indexOf(selectedSku)!=-1&&$("#div_28283").css("border-top","2px solid red");assocsitedProducts.push({id:"28283",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"LC650EQQ-SMA3"});$("input[name=radio-28283][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("28711");console.log("HV650QUB-N9E_selected:"+selectedSku,"HV650QUB-N9E".indexOf(selectedSku));$("#div_28711").offset()!==undefined&&"HV650QUB-N9E".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_28711").offset().top-200},500);selectedSku!=null&&"HV650QUB-N9E".indexOf(selectedSku)!=-1&&$("#div_28711").css("border-top","2px solid red");assocsitedProducts.push({id:"28711",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"HV650QUB-N9E"});console.log(countt,"countt");getProductDetail("28952");console.log("HV650QUB-F70_selected:"+selectedSku,"HV650QUB-F70".indexOf(selectedSku));$("#div_28952").offset()!==undefined&&"HV650QUB-F70".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_28952").offset().top-200},500);selectedSku!=null&&"HV650QUB-F70".indexOf(selectedSku)!=-1&&$("#div_28952").css("border-top","2px solid red");assocsitedProducts.push({id:"28952",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"HV650QUB-F70"});console.log(countt,"countt");getProductDetail("28953");console.log("LC650EGY-SMM3_selected:"+selectedSku,"LC650EGY-SMM3".indexOf(selectedSku));$("#div_28953").offset()!==undefined&&"LC650EGY-SMM3".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_28953").offset().top-200},500);selectedSku!=null&&"LC650EGY-SMM3".indexOf(selectedSku)!=-1&&$("#div_28953").css("border-top","2px solid red");assocsitedProducts.push({id:"28953",name:"پنل تلویزیون 65 ال جی",stock:"False",price:" تومان",sku:"LC650EGY-SMM3"});console.log(countt,"countt");getProductDetail("29397");console.log("HV650QUB-E9E_selected:"+selectedSku,"HV650QUB-E9E".indexOf(selectedSku));$("#div_29397").offset()!==undefined&&"HV650QUB-E9E".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29397").offset().top-200},500);selectedSku!=null&&"HV650QUB-E9E".indexOf(selectedSku)!=-1&&$("#div_29397").css("border-top","2px solid red");assocsitedProducts.push({id:"29397",name:"پنل تلویزیون 65 الجی",stock:"True",price:" تومان",sku:"HV650QUB-E9E"});$("input[name=radio-29397][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("29961");console.log("HV650QUB-F9L_selected:"+selectedSku,"HV650QUB-F9L".indexOf(selectedSku));$("#div_29961").offset()!==undefined&&"HV650QUB-F9L".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29961").offset().top-200},500);selectedSku!=null&&"HV650QUB-F9L".indexOf(selectedSku)!=-1&&$("#div_29961").css("border-top","2px solid red");assocsitedProducts.push({id:"29961",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"HV650QUB-F9L"});$("input[name=radio-29961][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("29962");console.log("LC650DQJ-SMA1_selected:"+selectedSku,"LC650DQJ-SMA1".indexOf(selectedSku));$("#div_29962").offset()!==undefined&&"LC650DQJ-SMA1".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_29962").offset().top-200},500);selectedSku!=null&&"LC650DQJ-SMA1".indexOf(selectedSku)!=-1&&$("#div_29962").css("border-top","2px solid red");assocsitedProducts.push({id:"29962",name:"پنل تلویزیون 65 ال جی",stock:"True",price:" تومان",sku:"LC650DQJ-SMA1"});$("input[name=radio-29962][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("31028");console.log("HV650QUB-N9EIR_selected:"+selectedSku,"HV650QUB-N9EIR".indexOf(selectedSku));$("#div_31027").offset()!==undefined&&"HV650QUB-N9EIR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_31027").offset().top-200},500);selectedSku!=null&&"HV650QUB-N9EIR".indexOf(selectedSku)!=-1&&$("#div_31027").css("border-top","2px solid red");p="HV650QUB-N9E";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-31027][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("31030");console.log("HV650QUB-F70IR_selected:"+selectedSku,"HV650QUB-F70IR".indexOf(selectedSku));$("#div_31029").offset()!==undefined&&"HV650QUB-F70IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_31029").offset().top-200},500);selectedSku!=null&&"HV650QUB-F70IR".indexOf(selectedSku)!=-1&&$("#div_31029").css("border-top","2px solid red");p="HV650QUB-F70";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-31029][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("31036");console.log("HV650QUB-N90_selected:"+selectedSku,"HV650QUB-N90".indexOf(selectedSku));$("#div_31036").offset()!==undefined&&"HV650QUB-N90".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_31036").offset().top-200},500);selectedSku!=null&&"HV650QUB-N90".indexOf(selectedSku)!=-1&&$("#div_31036").css("border-top","2px solid red");assocsitedProducts.push({id:"31036",name:"پنل تلویزیون 65",stock:"False",price:" تومان",sku:"HV650QUB-N90"});console.log(countt,"countt");getProductDetail("31037");console.log("HV650QUB-N90IR_selected:"+selectedSku,"HV650QUB-N90IR".indexOf(selectedSku));$("#div_31036").offset()!==undefined&&"HV650QUB-N90IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_31036").offset().top-200},500);selectedSku!=null&&"HV650QUB-N90IR".indexOf(selectedSku)!=-1&&$("#div_31036").css("border-top","2px solid red");p="HV650QUB-N90";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-31036][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()})})
| |