";
if(!false){
availabilityStatus += "";
}
}else if(item.quantityAvailable == 0 && item.availabilityDisplayText ==''){
availabilityStatus = "
' + item.salePrice; replaceTextDropDown = item.salePrice; } } else if(item.promoPrice !="" && item.promoPriceUsed == 'true'){ var sale = ''; if(true){ sale = "(Sale)"; } replaceText = /* availabilityStatus +"Ā -Ā " + */item.salePrice + sale; } else if (true && item.expertPrice !="" && item.expertPriceUsed == 'true') { replaceText = '
' + item.salePrice; replaceTextDropDown = item.salePrice; } }else{ if(false){ if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){ replaceText = item.salePrice + "(Clearance)"; } else if(item.promoPrice !="" && item.promoPriceUsed == 'true'){ replaceText = item.salePrice + "(Sale)"; } else if (true && item.expertPrice !="" && item.expertPriceUsed == 'true') { replaceText = '
' + item.salePrice; replaceTextDropDown = item.salePrice; } } else if(item.promoPrice !="" && item.promoPriceUsed == 'true'){ // replaceText = item.salePrice + "(Sale)"; replaceText = item.salePrice + "(Sale)"; } else if (true && item.expertPrice !="" && item.expertPriceUsed == 'true') { replaceText = '
' + item.salePrice; replaceTextDropDown = item.salePrice; } } // Display the marketSourceItem var qtyAvailable = item.quantityAvailable; var discontinuedItemStatus = item.discontinuedItemStatus; if(qtyAvailable "); // Show the description text for the call image, else user may not understand by just seeing the call image $('#discontd_desc').show(); } if(true && item.marketSourceItem !="" && item.marketSourceItem == 'true'){ //var existingText = $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(); //var newText = existingText.replace((existingText),"Login For Price"); var newText = "Login For Price"; $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(newText); $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(newText); $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } else if(item.callForPriceIndicator == 'true'){ var inquireForPriceText = $("#zeroPricingDiv").text(); var orderPriceText = $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(); var salePriceText = $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(); var dropDownPriceText = $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(); if (orderPriceText) { $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(inquireForPriceText + orderPriceText ); } else if (salePriceText) { $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(salePriceText.replace(retrieving,inquireForPriceText)); } else { $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(dropDownPriceText.replace(retrieving,inquireForPriceText)); } $("#qtyBox_" + jqEscapeId(item.skuId) + " input").prop('disabled',true); $("#qtyBox_" + jqEscapeId(item.skuId) + " button").prop('disabled',true); } else { // Slightly modifying the below logic to display the pricing in top and ordering grid of HYBRID var salePriceText = $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(); var orderPriceText = $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(); var dropDownPriceText = $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(); if(item.newProduct == 'true') { $("#newproduct_"+catNum).css("display", "inline"); } if(orderPriceText){ if(false){ if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){ $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(''+item.listPrice+'
'+item.salePrice+''); $("#clearance_"+catNum).css("display", "block"); } else{ $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(replaceText); } }else{ $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(replaceText); } }else if(salePriceText){ var newText = salePriceText.replace((retrieving),replaceText); if($("#SALEPRICE_"+jqEscapeId(item.skuId)).get(0).tagName == 'LABEL'){ if(false){ if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){ $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(''+item.listPrice+''+salePriceText.replace((retrieving),''+item.salePrice+'')); $("#clearance_"+catNum).css("display", "block"); }else{ $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } }else{ $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } }else{ if(false){ if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){ $("#clearance_"+catNum).css("display", "block"); } } $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } } else if(dropDownPriceText){ var newText = dropDownPriceText.replace((retrieving),replaceTextDropDown); $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } } //update the break price if(item.breakPriceMsg != ''){ /* This appends the break price message after regular price and will display the message properly if it has one UoM (we are directly displaying the pricing as label for single UoM). * But these prices will not display if it has drop down as the append happens after selelct box. However this will not be an issue as break price is applicable only for EU * countries and EU has one UoM */ $("#SALEPRICE_"+jqEscapeId(item.skuId)).closest('.search_ordering').append($('',{"class":'breakPricingColumn'}).html(item.breakPriceMsg)); // Adding colspan as 10, hence it will span across entire row and we will not have more than 10 columns $("#breakPrice_"+jqEscapeId(item.skuId)).html($(' ', {colspan:10, "class": 'breakPricingColumn'}).html(item.breakPriceMsg));
// Add the hasBreakPricing style class for the SKU row to show the BP message and sku row as single.
$("#orderingRow_"+jqEscapeId(item.skuId)).attr({"class": 'hasBreakPricing'});
}
if(isIndiaSite && false){
$("#avantorprocessedproduct_"+jqEscapeId(item.catalogNumber)).attr("style", "display:inline");
}
if(false && item.promoValidUpTo != null && item.promoValidUpTo!=''){
$("#onsalevalid_"+catNum).attr("style", "display:inline");
$("#promovalidupto_"+catNum).html(item.promoValidUpTo);
$("#onsale_"+catNum).attr("style", "display:inline");
}
});
if (thridPartyAvailabilityParam != "") {
$.getJSON(
'/store/services/pricing/json/thirdPartyAvailability.jsp?skuIds=' + thridPartyAvailabilityParam,
function(data){
$.each(data, function(index, item){
if (item.availabilityStatus == 1) {
availabilityStatus = "
';
$("#showViewCostSavingAlternative_"+response.currentCatalogNumber).html(emptyDiv);
}
if(response.webOrgEnableAvantorInsightsMostPurchased && response.userEnableAvantorInsightsMostPurchased && response.currentCatalogMostPurchased == 'true'){
var mostPurchasedText='" + availabilityStatus + "
";
}else{
availabilityStatus = "" + availabilityStatus + "
";
}
$("#lowestSKUAvailability_"+jqEscapeId(item.skuId)).html(availabilityStatus);
}
if(item.availabilityDisplayText == 'Direct from Supplier'){
if ("true" == item.available) {
availabilityStatus = "In Stock at Supplier
";
$("#lowestSKUAvailability_"+jqEscapeId(item.skuId)).html(availabilityStatus);
}else{
if (thridPartyAvailabilityParam == "") {
thridPartyAvailabilityParam = item.skuId + "~1";
} else {
thridPartyAvailabilityParam += "," + item.skuId + "~1";
}
}
}
replaceText = /*availabilityStatus +"Ā -Ā " + */ (contractPriceAllowed ? (item.salePrice) : item.listPrice);
// Display the PROMO / Sale price ONLY if the site is Bio express and PROMO is available
if(false){
if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){
var clearance = '';
if(true){
clearance = "(Clearance)";
}
replaceText = item.salePrice + clearance;
} else if(item.promoPrice !="" && item.promoPriceUsed == 'true'){
var sale = '';
if(true){
sale = "(Sale)";
}
replaceText = item.salePrice + sale;
}
else if (true && item.expertPrice !="" && item.expertPriceUsed == 'true')
{
replaceText = ''+item.listPrice+'
New Customer Promotional Price' + item.salePrice; replaceTextDropDown = item.salePrice; } } else if(item.promoPrice !="" && item.promoPriceUsed == 'true'){ var sale = ''; if(true){ sale = "(Sale)"; } replaceText = /* availabilityStatus +"Ā -Ā " + */item.salePrice + sale; } else if (true && item.expertPrice !="" && item.expertPriceUsed == 'true') { replaceText = '
'+item.listPrice+'
New Customer Promotional Price' + item.salePrice; replaceTextDropDown = item.salePrice; } }else{ if(false){ if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){ replaceText = item.salePrice + "(Clearance)"; } else if(item.promoPrice !="" && item.promoPriceUsed == 'true'){ replaceText = item.salePrice + "(Sale)"; } else if (true && item.expertPrice !="" && item.expertPriceUsed == 'true') { replaceText = '
'+item.listPrice+'
New Customer Promotional Price' + item.salePrice; replaceTextDropDown = item.salePrice; } } else if(item.promoPrice !="" && item.promoPriceUsed == 'true'){ // replaceText = item.salePrice + "(Sale)"; replaceText = item.salePrice + "(Sale)"; } else if (true && item.expertPrice !="" && item.expertPriceUsed == 'true') { replaceText = '
'+item.listPrice+'
New Customer Promotional Price' + item.salePrice; replaceTextDropDown = item.salePrice; } } // Display the marketSourceItem var qtyAvailable = item.quantityAvailable; var discontinuedItemStatus = item.discontinuedItemStatus; if(qtyAvailable "); // Show the description text for the call image, else user may not understand by just seeing the call image $('#discontd_desc').show(); } if(true && item.marketSourceItem !="" && item.marketSourceItem == 'true'){ //var existingText = $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(); //var newText = existingText.replace((existingText),"Login For Price"); var newText = "Login For Price"; $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(newText); $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(newText); $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } else if(item.callForPriceIndicator == 'true'){ var inquireForPriceText = $("#zeroPricingDiv").text(); var orderPriceText = $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(); var salePriceText = $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(); var dropDownPriceText = $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(); if (orderPriceText) { $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(inquireForPriceText + orderPriceText ); } else if (salePriceText) { $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(salePriceText.replace(retrieving,inquireForPriceText)); } else { $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(dropDownPriceText.replace(retrieving,inquireForPriceText)); } $("#qtyBox_" + jqEscapeId(item.skuId) + " input").prop('disabled',true); $("#qtyBox_" + jqEscapeId(item.skuId) + " button").prop('disabled',true); } else { // Slightly modifying the below logic to display the pricing in top and ordering grid of HYBRID var salePriceText = $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(); var orderPriceText = $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(); var dropDownPriceText = $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(); if(item.newProduct == 'true') { $("#newproduct_"+catNum).css("display", "inline"); } if(orderPriceText){ if(false){ if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){ $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(''+item.listPrice+'
'+item.salePrice+''); $("#clearance_"+catNum).css("display", "block"); } else{ $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(replaceText); } }else{ $("#ORDERSALEPRICE_"+jqEscapeId(item.skuId)).html(replaceText); } }else if(salePriceText){ var newText = salePriceText.replace((retrieving),replaceText); if($("#SALEPRICE_"+jqEscapeId(item.skuId)).get(0).tagName == 'LABEL'){ if(false){ if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){ $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(''+item.listPrice+''+salePriceText.replace((retrieving),''+item.salePrice+'')); $("#clearance_"+catNum).css("display", "block"); }else{ $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } }else{ $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } }else{ if(false){ if(item.clearancePriceEnabled == 'true' && item.promoPrice !="" && item.promoPriceUsed == 'true'){ $("#clearance_"+catNum).css("display", "block"); } } $("#SALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } } else if(dropDownPriceText){ var newText = dropDownPriceText.replace((retrieving),replaceTextDropDown); $("#DROPDOWNSALEPRICE_"+jqEscapeId(item.skuId)).html(newText); } } //update the break price if(item.breakPriceMsg != ''){ /* This appends the break price message after regular price and will display the message properly if it has one UoM (we are directly displaying the pricing as label for single UoM). * But these prices will not display if it has drop down as the append happens after selelct box. However this will not be an issue as break price is applicable only for EU * countries and EU has one UoM */ $("#SALEPRICE_"+jqEscapeId(item.skuId)).closest('.search_ordering').append($('',{"class":'breakPricingColumn'}).html(item.breakPriceMsg)); // Adding colspan as 10, hence it will span across entire row and we will not have more than 10 columns $("#breakPrice_"+jqEscapeId(item.skuId)).html($('
In Stock at Supplier
";
} else {
availabilityStatus = "Backordered
";
}
$("#lowestSKUAvailability_"+jqEscapeId(item.skuId)).html(availabilityStatus);
});
});
}
});
}
var ua = window.navigator.userAgent;
var ie = isIE(ua);
$.each($('div').find('select.uomSelect'),function(index,value){
var arr = [];
$.each(value, function(index, value){arr.push(value);});
arr.sort(function(a,b){
var aTxt = $(a).find('span').html();
var bTxt = $(b).find('span').html();
if(aTxt == 'In Stock'){
return 1;
}
if(bTxt == 'In Stock'){
return -1;
}
if(aTxt == 'Direct from Supplier' && (bTxt == 'Backordered' || bTxt == 'Direct from Supplier')){
return 1;
}else{
return -1;
}
});
if(ie){
arr.reverse();
}
$(value).empty();
$(value).append(arr);
value.selectedIndex = '0';
});
function showArticleNumber(localSkuIds){
}
function isIE(userAgent) {
userAgent = userAgent || navigator.userAgent;
return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1;
}
function getThumbnailHTML(catnum, thumbnail) {
var html = '';
return html;
}
function addComparisonProduct(catnum, thumbnail,thumbUri) {
comparisonProducts[comparisonProducts.length] = catnum;
comparisonThumbnails[comparisonThumbnails.length] = thumbnail;
document.getElementById('compare' + comparisonProducts.indexOf(catnum)).innerHTML = getThumbnailHTML(catnum, thumbnail);
redrawComparisonWidget();
var params="add="+catnum+"&thmb="+thumbUri;
$.ajax({type:'POST', cache: false, url:'/store/compare', data:params, success:function(data) {}});
}
function removeComparisonProduct(catnum, thumbnail) {
var idx = comparisonProducts.indexOf(catnum);
comparisonProducts.splice(idx, 1);
comparisonThumbnails.splice(idx, 1);
var params="remove="+catnum;
$.ajax({type:'POST', cache: false, url:'/store/compare',data:params, success:function(data) {}});
redrawComparisonWidget();
var buttons = document.getElementsByTagName('input');
for(var i=0; i -1) {
removeComparisonProduct(catnum, thumbnail);
element.value = 'Add to Compare';
} else {
if(comparisonProducts.length == 4) {
showModal('You cannot select more than four products for comparison.
'); } else { addComparisonProduct(catnum, thumbnail,thumbUri); element.value = 'Remove from compare'; } } } function clearComparisonProducts() { localStorage.removeItem('backToSearchResultsLink'); $.ajax({type:'GET', cache: false, url:'/store/compare?clear=true', success:function(data) { //Do Nothing }}); var buttons = document.getElementsByTagName('input'); for(var i=0; i 1) { localStorage.setItem('backToSearchResultsLink',window.location.href); window.location='/store/search/productComparison.jsp'; return true; } else { showModal('You need to select a minimum of two products for comparison.
');
return false;
}
}
function showModal(msg) {
$.fancybox.open(''+msg+'
');
}
$(document).ready(
function() {
redrawComparisonWidget();
});
function isNumeric(e) {
if(e.which != 8 && e.which != 0 && (e.which 57)) {
return false;
}
}
function setBackToSearchPageFromInsights(e){
e.preventDefault();
localStorage.removeItem('backToProductPageLink');
localStorage.setItem('backToSearchResultsFromInsights',window.location.href);
}
/* $(".search_product_name").click(function(){
universalAnalytics('productClick','ProductLinkClick','HybridView','ProductLinkClick','catalogNumber='+'');
});
$(".column-1").click(function(){
universalAnalytics('productClick','ProductImageClick','HybridView','ProductImageClick','catalogNumber='+'');
}); */
Most Purchased by your Company
'; $("#showViewCostSavingAlternative_"+response.currentCatalogNumber).append(mostPurchasedText); } } } }); } //Get the cell values based on STIBO if(index == hideIndex){ // Add the catalog # and its description explicitly. rowContent.append($('