"+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:"13395",name:"پایه رومیزی 49LH510V",stock:"False",price:" 390,000 تومان",sku:"AAN75710201"});stockProducts.push({id:"13396",name:"پایه رومیزی 49LH510V",stock:"False",price:" 290,000 تومان",sku:"AAN75710201IR"});stockProducts.push({id:"13397",name:"پایه رومیزی 49LH510V",stock:"False",price:" 390,000 تومان",sku:"AAN75710202"});stockProducts.push({id:"13398",name:"پایه رومیزی 49LH510V",stock:"False",price:" 290,000 تومان",sku:"AAN75710202IR"});stockProducts.push({id:"13399",name:"پایه رومیزی 49LH510V",stock:"False",price:" 580,000 تومان",sku:"MAM643246"});stockProducts.push({id:"13400",name:"پایه رومیزی 49LH510V",stock:"False",price:" 480,000 تومان",sku:"MAM643246IR"});stockProducts.push({id:"13401",name:"پایه رومیزی 49LH510V",stock:"False",price:" 390,000 تومان",sku:"MAZ65286701"});stockProducts.push({id:"13402",name:"پایه رومیزی 49LH510V",stock:"False",price:" 290,000 تومان",sku:"MAZ65286701IR"});stockProducts.push({id:"13403",name:"پایه رومیزی 49LH510V",stock:"False",price:" 390,000 تومان",sku:"MAZ65286702"});stockProducts.push({id:"13404",name:"پایه رومیزی 49LH510V",stock:"False",price:" 290,000 تومان",sku:"MAZ65286702IR"});console.log(countt,"countt");getProductDetail("13395");console.log("AAN75710201_selected:"+selectedSku,"AAN75710201".indexOf(selectedSku));$("#div_13395").offset()!==undefined&&"AAN75710201".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13395").offset().top-200},500);selectedSku!=null&&"AAN75710201".indexOf(selectedSku)!=-1&&$("#div_13395").css("border-top","2px solid red");assocsitedProducts.push({id:"13395",name:"پایه رومیزی 49LH510V",stock:"False",price:" 390,000 تومان",sku:"AAN75710201"});console.log(countt,"countt");getProductDetail("13396");console.log("AAN75710201IR_selected:"+selectedSku,"AAN75710201IR".indexOf(selectedSku));$("#div_13395").offset()!==undefined&&"AAN75710201IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13395").offset().top-200},500);selectedSku!=null&&"AAN75710201IR".indexOf(selectedSku)!=-1&&$("#div_13395").css("border-top","2px solid red");p="AAN75710201";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-13395][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("13397");console.log("AAN75710202_selected:"+selectedSku,"AAN75710202".indexOf(selectedSku));$("#div_13397").offset()!==undefined&&"AAN75710202".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13397").offset().top-200},500);selectedSku!=null&&"AAN75710202".indexOf(selectedSku)!=-1&&$("#div_13397").css("border-top","2px solid red");assocsitedProducts.push({id:"13397",name:"پایه رومیزی 49LH510V",stock:"False",price:" 390,000 تومان",sku:"AAN75710202"});console.log(countt,"countt");getProductDetail("13398");console.log("AAN75710202IR_selected:"+selectedSku,"AAN75710202IR".indexOf(selectedSku));$("#div_13397").offset()!==undefined&&"AAN75710202IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13397").offset().top-200},500);selectedSku!=null&&"AAN75710202IR".indexOf(selectedSku)!=-1&&$("#div_13397").css("border-top","2px solid red");p="AAN75710202";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-13397][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("13399");console.log("MAM643246_selected:"+selectedSku,"MAM643246".indexOf(selectedSku));$("#div_13399").offset()!==undefined&&"MAM643246".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13399").offset().top-200},500);selectedSku!=null&&"MAM643246".indexOf(selectedSku)!=-1&&$("#div_13399").css("border-top","2px solid red");assocsitedProducts.push({id:"13399",name:"پایه رومیزی 49LH510V",stock:"False",price:" 580,000 تومان",sku:"MAM643246"});console.log(countt,"countt");getProductDetail("13400");console.log("MAM643246IR_selected:"+selectedSku,"MAM643246IR".indexOf(selectedSku));$("#div_13399").offset()!==undefined&&"MAM643246IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13399").offset().top-200},500);selectedSku!=null&&"MAM643246IR".indexOf(selectedSku)!=-1&&$("#div_13399").css("border-top","2px solid red");p="MAM643246";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-13399][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("13401");console.log("MAZ65286701_selected:"+selectedSku,"MAZ65286701".indexOf(selectedSku));$("#div_13401").offset()!==undefined&&"MAZ65286701".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13401").offset().top-200},500);selectedSku!=null&&"MAZ65286701".indexOf(selectedSku)!=-1&&$("#div_13401").css("border-top","2px solid red");assocsitedProducts.push({id:"13401",name:"پایه رومیزی 49LH510V",stock:"False",price:" 390,000 تومان",sku:"MAZ65286701"});console.log(countt,"countt");getProductDetail("13402");console.log("MAZ65286701IR_selected:"+selectedSku,"MAZ65286701IR".indexOf(selectedSku));$("#div_13401").offset()!==undefined&&"MAZ65286701IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13401").offset().top-200},500);selectedSku!=null&&"MAZ65286701IR".indexOf(selectedSku)!=-1&&$("#div_13401").css("border-top","2px solid red");p="MAZ65286701";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-13401][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("13403");console.log("MAZ65286702_selected:"+selectedSku,"MAZ65286702".indexOf(selectedSku));$("#div_13403").offset()!==undefined&&"MAZ65286702".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13403").offset().top-200},500);selectedSku!=null&&"MAZ65286702".indexOf(selectedSku)!=-1&&$("#div_13403").css("border-top","2px solid red");assocsitedProducts.push({id:"13403",name:"پایه رومیزی 49LH510V",stock:"False",price:" 390,000 تومان",sku:"MAZ65286702"});console.log(countt,"countt");getProductDetail("13404");console.log("MAZ65286702IR_selected:"+selectedSku,"MAZ65286702IR".indexOf(selectedSku));$("#div_13403").offset()!==undefined&&"MAZ65286702IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_13403").offset().top-200},500);selectedSku!=null&&"MAZ65286702IR".indexOf(selectedSku)!=-1&&$("#div_13403").css("border-top","2px solid red");p="MAZ65286702";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-13403][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()})})
| |