"+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:"12142",name:"بکلایت 55K با آینه سری 5",stock:"False",price:" 1,100,000 تومان",sku:"AGF55K5A002"});stockProducts.push({id:"12143",name:"بکلایت 55K با آینه سری 5",stock:"False",price:" 380,000 تومان",sku:"AGF55K5A002IR"});stockProducts.push({id:"12144",name:"بکلایت 55K بدون آینه سری 6",stock:"True",price:" 890,000 تومان",sku:"AGF55K5AWM2"});stockProducts.push({id:"12145",name:"بکلایت 55K بدون آینه سری 6",stock:"False",price:" 170,000 تومان",sku:"AGF55K5AWM2IR"});stockProducts.push({id:"12146",name:"بکلایت 55K با آینه سری 5",stock:"False",price:" 1,100,000 تومان",sku:"AGF55K5C002"});stockProducts.push({id:"12147",name:"بکلایت 55K با آینه سری 5",stock:"False",price:" 380,000 تومان",sku:"AGF55K5C002IR"});stockProducts.push({id:"12148",name:"بکلایت 55K سری 6",stock:"True",price:" 790,000 تومان",sku:"AGF55K6A721"});stockProducts.push({id:"12149",name:"بکلایت 55K سری 6",stock:"True",price:" 195,000 تومان",sku:"AGF55K6A721IR"});stockProducts.push({id:"12150",name:"بکلایت 55K سری 6",stock:"False",price:" 790,000 تومان",sku:"AGF55K6C721"});stockProducts.push({id:"12151",name:"بکلایت 55K سری 6",stock:"False",price:" 195,000 تومان",sku:"AGF55K6C721IR"});console.log(countt,"countt");getProductDetail("12142");console.log("AGF55K5A002_selected:"+selectedSku,"AGF55K5A002".indexOf(selectedSku));$("#div_12142").offset()!==undefined&&"AGF55K5A002".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12142").offset().top-200},500);selectedSku!=null&&"AGF55K5A002".indexOf(selectedSku)!=-1&&$("#div_12142").css("border-top","2px solid red");assocsitedProducts.push({id:"12142",name:"بکلایت 55K با آینه سری 5",stock:"False",price:" 1,100,000 تومان",sku:"AGF55K5A002"});console.log(countt,"countt");getProductDetail("12143");console.log("AGF55K5A002IR_selected:"+selectedSku,"AGF55K5A002IR".indexOf(selectedSku));$("#div_12142").offset()!==undefined&&"AGF55K5A002IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12142").offset().top-200},500);selectedSku!=null&&"AGF55K5A002IR".indexOf(selectedSku)!=-1&&$("#div_12142").css("border-top","2px solid red");p="AGF55K5A002";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-12142][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("12144");console.log("AGF55K5AWM2_selected:"+selectedSku,"AGF55K5AWM2".indexOf(selectedSku));$("#div_12144").offset()!==undefined&&"AGF55K5AWM2".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12144").offset().top-200},500);selectedSku!=null&&"AGF55K5AWM2".indexOf(selectedSku)!=-1&&$("#div_12144").css("border-top","2px solid red");assocsitedProducts.push({id:"12144",name:"بکلایت 55K بدون آینه سری 6",stock:"True",price:" 890,000 تومان",sku:"AGF55K5AWM2"});$("input[name=radio-12144][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("12145");console.log("AGF55K5AWM2IR_selected:"+selectedSku,"AGF55K5AWM2IR".indexOf(selectedSku));$("#div_12144").offset()!==undefined&&"AGF55K5AWM2IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12144").offset().top-200},500);selectedSku!=null&&"AGF55K5AWM2IR".indexOf(selectedSku)!=-1&&$("#div_12144").css("border-top","2px solid red");p="AGF55K5AWM2";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-12144][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("12146");console.log("AGF55K5C002_selected:"+selectedSku,"AGF55K5C002".indexOf(selectedSku));$("#div_12146").offset()!==undefined&&"AGF55K5C002".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12146").offset().top-200},500);selectedSku!=null&&"AGF55K5C002".indexOf(selectedSku)!=-1&&$("#div_12146").css("border-top","2px solid red");assocsitedProducts.push({id:"12146",name:"بکلایت 55K با آینه سری 5",stock:"False",price:" 1,100,000 تومان",sku:"AGF55K5C002"});console.log(countt,"countt");getProductDetail("12147");console.log("AGF55K5C002IR_selected:"+selectedSku,"AGF55K5C002IR".indexOf(selectedSku));$("#div_12146").offset()!==undefined&&"AGF55K5C002IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12146").offset().top-200},500);selectedSku!=null&&"AGF55K5C002IR".indexOf(selectedSku)!=-1&&$("#div_12146").css("border-top","2px solid red");p="AGF55K5C002";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-12146][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("12148");console.log("AGF55K6A721_selected:"+selectedSku,"AGF55K6A721".indexOf(selectedSku));$("#div_12148").offset()!==undefined&&"AGF55K6A721".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12148").offset().top-200},500);selectedSku!=null&&"AGF55K6A721".indexOf(selectedSku)!=-1&&$("#div_12148").css("border-top","2px solid red");assocsitedProducts.push({id:"12148",name:"بکلایت 55K سری 6",stock:"True",price:" 790,000 تومان",sku:"AGF55K6A721"});$("input[name=radio-12148][value='1']").prop("checked",!0);console.log(countt,"countt");getProductDetail("12149");console.log("AGF55K6A721IR_selected:"+selectedSku,"AGF55K6A721IR".indexOf(selectedSku));$("#div_12148").offset()!==undefined&&"AGF55K6A721IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12148").offset().top-200},500);selectedSku!=null&&"AGF55K6A721IR".indexOf(selectedSku)!=-1&&$("#div_12148").css("border-top","2px solid red");p="AGF55K6A721";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-12148][value='2']").prop("checked",!0);console.log(countt,"countt");getProductDetail("12150");console.log("AGF55K6C721_selected:"+selectedSku,"AGF55K6C721".indexOf(selectedSku));$("#div_12150").offset()!==undefined&&"AGF55K6C721".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12150").offset().top-200},500);selectedSku!=null&&"AGF55K6C721".indexOf(selectedSku)!=-1&&$("#div_12150").css("border-top","2px solid red");assocsitedProducts.push({id:"12150",name:"بکلایت 55K سری 6",stock:"False",price:" 790,000 تومان",sku:"AGF55K6C721"});console.log(countt,"countt");getProductDetail("12151");console.log("AGF55K6C721IR_selected:"+selectedSku,"AGF55K6C721IR".indexOf(selectedSku));$("#div_12150").offset()!==undefined&&"AGF55K6C721IR".indexOf(selectedSku)!=-1&&selectedSku!=null&&$([document.documentElement,document.body]).animate({scrollTop:$("#div_12150").offset().top-200},500);selectedSku!=null&&"AGF55K6C721IR".indexOf(selectedSku)!=-1&&$("#div_12150").css("border-top","2px solid red");p="AGF55K6C721";mainProduct=stockProducts.find(n=>n.sku==p);console.log(p,"p");console.log(mainProduct,"mainProduct");mainProduct.stock!="True"&&$("input[name=radio-12150][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()})})
| |