'; htmlcontentAssembly += '' + AssemblyArrayitems[indexAssembly].ItemDesc + ' '; htmlcontentAssembly += '' + AssemblyArrayitems[indexAssembly].ItemQty + ' '; htmlcontentAssembly += '' + AssemblyArrayitems[indexAssembly].ItemUOM + ' '; htmlcontentAssembly += ' '; } $("#contentListItemsModalAssembly").html(htmlcontentAssembly); } /** DXPB2BSUPP-746 **/ /** DXPB2BSUPP-713 **/ $(".AdditionalImagesItem img").each(function (index) { ImagesArrayitems.push($(this).attr("src")); }); if (ImagesArrayitems.length > 0) { var htmlContentExtra = ""; for (let indexItem = 0; indexItem < ImagesArrayitems.length; indexItem++) { htmlContentExtra += ''; htmlContentExtra += ' '; htmlContentExtra += ' '; htmlContentExtra += ' '; } $("#bzoom").append(htmlContentExtra); } /** DXPB2BSUPP-713 **/ if ($("#ExtendedDescription").text().trim().length > 0 && $("#ItemCodeID").text().indexOf("PWIND") > -1) { $(".product-description-reponsive").text(""); $(".product-description").text(""); $(".product-text").text(""); $(".product-description").text($("#ExtendedDescription").text()); $(".product-description-reponsive").text($("#ExtendedDescription").text()); $(".product-text").text($("#ExtendedDescription").text()); } if ($("#imgItemDetail_new")[0].complete) { adjustImageSize($("#imgItemDetail_new")); } else { $("#imgItemDetail_new").load(function () { adjustImageSize($(this)); }); } $(".bzoom img[src='undefined']").hide(); $("body").addClass("product-page"); $("section.contentOneFull").addClass("pPage"); /**Update Oxiyen 10/29/2019 Execute when no have locations**/ $("#IDDetecteLocationinItemDetail").val(1); var textVal = $("#TR_ItemDetailItemLocationTableDetail0 #TR_ItemDetailItemLocationTableDetail0_TD_1 .ItemDetailalt_loc_attribute").text(); if (textVal.trim() == "" || textVal.trim() == undefined) { $("#alternativeOxi").remove(); //$("#contentDynamicForValideteLocationText").append('Qty:
'); $("#updateIfNoExitsLoginTableItemDetailIDData").attr("class", ""); $("#IDDetecteLocationinItemDetail").val(2); var qtyRegex = /qty=(\d*)/; var qty = ''; if (qtyRegex.test(window.location.search)) { var execResult = qtyRegex.exec(window.location.search); qty = execResult[1]; $('#txtItemDetailQuantity0').val(qty); calculateSum(); } } /**valide location available**/ var typeLoc = $("#IDDetecteLocationinItemDetail").val(); if (typeLoc == 1) { if (shopperLocationBasedOrdering == "True") { $(document.body).on("locked-locations-ready", function () { var countLocationAvailableOxi = 0; var indexLocationAvailableOxi = 0; $(".rowContentLocationItemDetailForEach").each(function (index) { var textLocation = $(this).find('td:eq(0)').text().trim(); var textidLocation = $(this).find('td:eq(3) input[id^="txtLocationID"]').val(); var locationIdLocation = $(this).find('.inputLocationDataOxi input:eq(1)').val(); var countDatInput = 0; for (let index = 0; index < arrayLocationsLockedsMaster.length; index++) { if (arrayLocationsLockedsMaster[index]["idlocation"] == locationIdLocation) { countDatInput++; } } if (countDatInput != 0) { $(this).find('.ItemDetailalt_loc_attribute .ItemDetail_QuantityTextBox').attr("readonly", ""); $(this).find('.ItemDetailalt_loc_attribute .ItemDetail_QuantityTextBox').css("background-color", "#EFEFEF"); $(this).find('.ItemDetailalt_loc_attribute .ItemDetail_QuantityTextBox').css("cursor", "auto"); $(this).find('.ItemDetailalt_loc_attribute .ItemDetail_QuantityTextBox').css("border", "1px solid"); $(this).find('.ItemDetailalt_loc_attribute .ItemDetail_QuantityTextBox').tooltip({ placement: "right", title: tooltipLockedTextMaster }); } /** DXPB2BSUPP-671 **/ var statusBines = false; var auxBinTextList = []; var auxBinQtyList = []; var auxBinLimit = []; Object.keys(itemsBinLocation).forEach(function (key) { if (key == "DURAC 243-MX2500B2PK") { statusBines = true; for (let indexBin = 0; indexBin < itemsBinLocation[key].length; indexBin++) { var binSingle = itemsBinLocation[key][indexBin]; if (textidLocation == binSingle["locationId"]) { auxBinTextList.push(binSingle["bin"]); auxBinQtyList.push(binSingle["qty"]); auxBinLimit.push({ invMin: binSingle["invMin"], invMax: binSingle["invMax"], primaryBinFlag: binSingle["primaryBinFlag"] }); } } } }); var htmlbines = ''; if (auxBinTextList.length > 0) { var itemCode = 'DURAC 243-MX2500B2PK'; for (let indexPrint = 0; indexPrint < auxBinTextList.length; indexPrint++) { var displayBins = false; var displayMinMax = false; if (binZeroAvail && auxBinQtyList[indexPrint] == 0 && auxBinLimit[indexPrint].primaryBinFlag == 'Y') { displayBins = true; if (auxBinLimit[indexPrint].invMin > 0 && auxBinLimit[indexPrint].invMax > 0) { displayMinMax = true; } } else if (auxBinQtyList[indexPrint] > 0) { displayBins = true; if (auxBinLimit[indexPrint].invMin > 0 && auxBinLimit[indexPrint].invMax > 0) { displayMinMax = true; } } if (displayBins) { htmlbines += 'Bin : ' + auxBinTextList[indexPrint] + '
'; } if (displayBinLocationsMinMax) { if (displayMinMax) { htmlbines += 'Min : ' + auxBinLimit[indexPrint].invMin + ' | Max : ' + auxBinLimit[indexPrint].invMax + ' '; } } var customUom = ""; try { customUom = $(this).find('.ItemDetailalt_loc_attribute .ItemDetail_Availability').text().trim().split(" ")[1]; } catch (error) { customUom = ""; } //if(uomCol == undefined){ // uomCol = ""; //} if (displayBins) { $(this).find('.ItemDetailalt_loc_attribute .ItemDetail_Availability').after('' + auxBinQtyList[indexPrint] + ' ' + customUom + ' '); } } } htmlbines += ''; $(this).find('td:eq(0)').append(htmlbines); /** DXPB2BSUPP-671 **/ var matchValue = arrayIdLocations.includes(textidLocation); if (!matchValue) { $(this).hide(); countLocationAvailableOxi = countLocationAvailableOxi + 1; } indexLocationAvailableOxi = indexLocationAvailableOxi + 1; }); if (countLocationAvailableOxi == indexLocationAvailableOxi) { $("#TR_ItemDetailItemLocationTableDetail0").show(); $("#TR_ItemDetailItemLocationTableHeader").hide(); $("#TR_ItemDetailItemLocationTableDetail0_TD_2").css("width", "50px"); $("#TR_ItemDetailItemLocationTableDetail0_TD_2").css("text-align", "left"); $("#TR_ItemDetailItemLocationTableDetail0 td").each(function (index) { if (index == 0 || index == 2) { $(this).hide() } if (index == 1) { $("#updateIfNoExitsLoginTableItemDetailIDData").attr("class", ""); $(this).html('Qty: '); } }); } $("#alternativeOxi").fadeIn(); }); $(".contentInputWithOptions").css("float", "right"); } else { $("#TR_ItemDetailItemLocationTableDetail0").show(); $("#TR_ItemDetailItemLocationTableHeader").hide(); $("#alternativeOxi").css("margin-left", "-170px"); $("#alternativeOxi").css("margin-top", "7px"); $("#TR_ItemDetailItemLocationTableDetail0_TD_2").css("width", "150px"); $("#TR_ItemDetailItemLocationTableDetail0_TD_2").css("text-align", "left"); $("#TR_ItemDetailItemLocationTableDetail0 td").each(function (index) { if (index == 0 || index == 2) { $(this).hide() } if (index == 1) { $("#updateIfNoExitsLoginTableItemDetailIDData").attr("class", ""); $(this).html('Qty: '); } }); } } else { $(".contentInputWithOptions") $(".contentInputWithOptions").css("float", "right"); } //UPDATE OXIYEN var scrollNumber = carouselScrollHandle(); $(".categories-list ul").html(""); $(".CatalogTopItems_CategoryLinks").each(function (index, obj) { $(".categories-list ul").append("" + $(obj).text() + " "); }); $(".product-description").text($(".product-description").text().replace(/,/g, ", ")); if ($("span.price:contains('Request for Quote')").length > 0) { $("#addProductButton input").click(function () { showModalWindow("Item cannot be added to the cart. Please contact customer service for pricing 1-800-830-3973"); }); } if ($("#SignInLink").text().indexOf("sign out") == -1) { $(".price").text(""); $(".price").html('Login for price '); $("#contentDynamicForValideteLocationText .qty").remove(); $(".total-value").remove(); } var priceItemDetail = $(".product-price span.price").text(); if (priceItemDetail.indexOf("$0.00") > -1) { if (hidePriceDisplay != "True") { var buttonPrice = $("#ButtonAddToCart"); $(buttonPrice).text("Add to Quote"); $(".product-price span.price").text("Request for Quote"); $(buttonPrice).attr("onclick", "addtoquoteItemDetail()"); $("#addtoquoteyayi2").remove(); $("body.product-page .pDetails").css("padding-bottom", "56px"); $(".total-value").remove(); } } }); function carouselScrollHandle() { return Math.floor($('#ca-container').width() / $("#ca-container .ca-item").first().width()); } function adjustImageSize(image) { var imageHeight = $(image).height(); var imageWidth = $(image).width(); var maxSize = 425; var scaleX = $(image).width() / maxSize; var scaleY = $(image).height() / maxSize; //If the image is bigger I have to use the greater scale, if the image is smaller I have to use the smaller scale if (scaleX > 1 || scaleY > 1) { if (Math.abs(1 - scaleX) > Math.abs(1 - scaleY)) { imageWidth = $(image).width() / scaleX; imageHeight = $(image).height() / scaleX; } else { imageWidth = $(image).width() / scaleY; imageHeight = $(image).height() / scaleY; } } else { if (Math.abs(1 - scaleX) < Math.abs(1 - scaleY)) { imageWidth = $(image).width() / scaleX; imageHeight = $(image).height() / scaleX; } else { imageWidth = $(image).width() / scaleY; imageHeight = $(image).height() / scaleY; } } if (imageWidth > (maxSize + 3)) { imageWidth = imageWidth * 0.75; imageHeight = imageHeight * 0.75; } setTimeout(function () {///workaround if (navigator.userAgent.indexOf('Edge') >= 0) { $("#imageBgWithoutLupa").css("height", imageHeight); $("#imageBgWithoutLupa").css("width", imageWidth); $("#ItemImage").css("height", "0"); $("#edgeLupaZoomItemDetail").show(); $("#lupaHideForEdge").hide(); } else { $("#bzoom").zoom({ align: "left", thumb_image_width: imageWidth, thumb_image_height: imageHeight, source_image_width: imageWidth * 2, source_image_height: imageHeight * 2, zoom_area_width: 600, zoom_area_distance: 10, zoom_easing: true, description_opacity: 0.7, small_thumbs: 4, smallthumb_inactive_opacity: 0.4, smallthumbs_position: "bottom", show_icon: true, hide_cursor: false, speed: 600, autoplay: false, autoplay_interval: 6000 }); $(".bzoom img[src='undefined']").hide(); } if(imageWidth > maxSize){ $(image).addClass("image-size"); } }, 650); } /** DXPB2BSUPP-364 **/ function validateAddToCart(formName) { if ($("#SignInLink").text().indexOf("sign out") != -1) { if (parseFloat($('#sum').text()) > 0) { addItemsToCart(formName, '/SystemFolders/p21customerpages/MiniShoppingCartView.aspx?', '/SystemFolders/p21customerpages/ProcessingMessage.htm'); } else { if (hidePriceDisplay == "True") { addItemsToCart(formName, '/SystemFolders/p21customerpages/MiniShoppingCartView.aspx?', '/SystemFolders/p21customerpages/ProcessingMessage.htm'); } } } else { showModalWindow(" Warning! You must login to before adding items to the cart"); } } /** DXPB2BSUPP-364 **/ function renderBoughtTogetherProducts() { var boughtTogetherHtml = ""; if (boughtTogetherHtml != "") { $("#ca-container3 .ca-wrapper").html(accessoryProductsHtml); $('#ca-container3').contentcarousel({ scroll: carouselScrollHandle() }); } else { $("#ca-container3").hide(); $("#bought-together-products-hr").hide(); $("#bought-together-products").hide(); $("#liBoughtTogetherProducts").hide(); } } function renderAccessoryProducts() { var accessoryProductsHtml = ""; for (var i = 0; i < goTogethers.length; i++) { item = goTogethers[i]; accessoryProductsHtml += '
'; }; if (accessoryProductsHtml != "") { $("#ca-container .ca-wrapper").html(accessoryProductsHtml); $('#ca-container').contentcarousel(); } else { $("#ca-container").hide(); $("#accessory-products-hr").hide(); $("#accessory-products").hide(); $("#liAccessoryProducts").hide(); } } function renderTogetherProducts() {if (goTogethers.length > 0) { var loginValue = $("#loginValue").val(); $(".button-list").append('Accessory Products '); var togethersProductsHtml = ''; togethersProductsHtml += ''; togethersProductsHtml += '
'; togethersProductsHtml += '
'; togethersProductsHtml += ' '; togethersProductsHtml += ' '; togethersProductsHtml += '
'; togethersProductsHtml += '
'; togethersProductsHtml += ''; for (var i = 0; i < goTogethers.length; i++) { var item = goTogethers[i]; if (loginValue.toLowerCase() == "logon") { togethersProductsHtml += '
'; } else { togethersProductsHtml += '
'; } togethersProductsHtml += '
'; togethersProductsHtml += '
'; }; togethersProductsHtml += '
'; $(".together-products-carrousel").html(togethersProductsHtml); setTimeout(function () { owlhome = $(".carousel-together-Products").owlCarousel({ loop: true, responsiveClass: true, responsive: { 0: { items: 1, nav: true, slideBy: 1, }, 600: { items: 2, nav: false, slideBy: 2, }, 1000: { items: 3, nav: true, loop: false, slideBy: 3, }, 1200: { items: 4, nav: true, loop: false, slideBy: 4, }, 1500: { items: 5, nav: true, loop: false, slideBy: 5, }, }, }); $(".next-button").click(function () { owlhome.trigger("next.owl.carousel"); }); $(".previous-button").click(function () { owlhome.trigger("prev.owl.carousel", [300]); }); $("#together-products-container").show(); owlhome.trigger("refresh.owl.carousel"); }, 10);}} function renderAlternateProducts() { if (alternates.length > 0) { var loginValue = $("#loginValue").val(); $(".button-list").append('Alternate Products '); var alternateProductsHtml = ''; alternateProductsHtml += '
'; alternateProductsHtml += '
'; alternateProductsHtml += '
'; alternateProductsHtml += ' '; alternateProductsHtml += ' '; alternateProductsHtml += '
'; alternateProductsHtml += '
'; alternateProductsHtml += '
'; for (var i = 0; i < alternates.length; i++) { var item = alternates[i]; if (loginValue.toLowerCase() == "logon") { alternateProductsHtml += '
'; } else { alternateProductsHtml += '
'; } alternateProductsHtml += '
'; alternateProductsHtml += '
'; /* if (item.itemPrice.length != 0) { alternateProductsHtml += '
Price: '; alternateProductsHtml += item.itemPrice; alternateProductsHtml += '
' } else { alternateProductsHtml += 'Login for Price '; } alternateProductsHtml += '
Qty:
'; alternateProductsHtml += '
'; alternateProductsHtml += '
' alternateProductsHtml += '
';*/ }; alternateProductsHtml += '
'; $(".alternate-products-carrousel").html(alternateProductsHtml); setTimeout(function () { owlhome = $(".carousel-Alternate-Products").owlCarousel({ loop: true, responsiveClass: true, responsive: { 0: { items: 1, nav: true, slideBy: 1, }, 600: { items: 2, nav: false, slideBy: 2, }, 1000: { items: 3, nav: true, loop: false, slideBy: 3, }, 1200: { items: 4, nav: true, loop: false, slideBy: 4, }, 1500: { items: 5, nav: true, loop: false, slideBy: 5, }, }, }); $(".next-button").click(function () { owlhome.trigger("next.owl.carousel"); }); $(".previous-button").click(function () { owlhome.trigger("prev.owl.carousel", [300]); }); $("#alternate-products-container").show(); owlhome.trigger("refresh.owl.carousel"); }, 10); } }
"; // }*/ // textInfo = textInfo.substring(0, textInfo.lastIndexOf(";")); // textInfo += ''; // htmlTable += ""; // $('.ItemDetailProperties').html(textInfo + htmlTable); $('form[name="frmSubstitutes"] .ItemSearchResults_ItemCode').closest('tr').each(function () { var itemCode = $(this).find('.ItemSearchResults_ItemCode').text(); var itemPrice = $(this).find('.ItemSearchResults_Price').text(); var itemLink = $(this).find('.ItemSearchResults_ItemCode').attr('href'); var thumbnail = $(this).find('.ItemSearchResults_Thumbnail').attr('src'); var itemDesc = $(this).find('.ItemSearchResults_Description').text(); itemDesc = itemDesc.replace("Customer Part #:", "").trim(); if (thumbnail.indexOf("images/spacer.gif") > -1) { thumbnail = "/customer/dxenin/images/NoImageAvailable.png"; } alternates.push({ itemCode: itemCode, itemPrice: itemPrice, itemLink: itemLink, thumbnail: thumbnail, itemDesc: itemDesc }); }); $('form[name="frmGoTogethers"] .ItemSearchResults_ItemCode').closest('tr').each(function () { var itemCode = $(this).find('.ItemSearchResults_ItemCode').text(); var itemPrice = $(this).find('.ItemSearchResults_Price').text(); var itemLink = $(this).find('.ItemSearchResults_ItemCode').attr('href'); var thumbnail = $(this).find('.ItemSearchResults_Thumbnail').attr('src'); var itemDesc = $(this).find('.ItemSearchResults_Description').text(); var swiperSlide = '