');jQuery('td#prod_item_' + this.sPKey + ' div.actions input.btn_addtocart').removeAttr('disabled');//HideLoading();}; //- Uom.drawPriceUom.loading = function () {jQuery('td#prod_item_' + this.sPKey + ' div.actions input.btn_addtocart').attr('disabled','disabled');jQuery('td#prod_item_' + this.sPKey + ' div.item_pricing').html(sLoadingMessage);}; //- Uom.loading/** * toggleQty */Uom.toggleQty = function () {/*if(jQuery('#uom_type_' + this.sPKey).val() == 'sales'){jQuery('#qty_' + this.sPKey).attr("name", 'sales_qty_' + this.sPKey);} else {jQuery('#qty_' + this.sPKey).attr("name", 'qty_' + this.sPKey);}//-if(jQuery('#uom_type_' + vPKey).val() == 'sales')NO! Don't do this!*/}; //- Uom.toggleDisplay/** * error */Uom.error = function () {alert('There was an error retrieving the information for the product you selected.');}; //- Uom.error})(UomJQ);/** * AJAX Call to remove item from favorites list. * * @author johns * @since 10/15/2009 */function fncRemoveItem ( sProdKey ) {jQuery.ajax({url: sPageName,data: 'pageaction=removefavitems&p_key=' + sProdKey + '&fl_key=' + sFl_Key + '&r_id=' + new Date().getTime(),type: 'GET',async: false,dataType: 'text',success: function () { fncRemoveItemCompleted ( sProdKey ); }});} //- function fncRemoveItem ( sProdKey )//- EVENT FUNCTIONS ==================================================function fncRemoveItemCompleted( p_key ) {//list viewvar $container = jQuery('td#prod_item_' + p_key);var $container2 = jQuery('tr#' + p_key);if ($container.length > 0) {// $container.hide();$container.remove();} else {// $container2.hide();$container2.remove();}//gallery view$container = jQuery('div#prod_item_' + p_key);if ($container.length > 0) {$container.remove();}} //- function fncRemoveItemCompleted( p_key )//================================================================function closeCartLightbox() {if (jQuery('#cart_window_unused').length) {//cart_windowoAjax.Reset();oAjax.RequestFile= 'i_i_shopping_cart_window.asp'oAjax.Method= 'GET';oAjax.onCompletion= function () {jQuery('#cart_window_unused').replaceWith(oAjax.Response);jQuery("#atc_msg_buttons").show();tb_init('#cartwin_shipping a.thickbox');};oAjax.ResponseType= 'text'; //- The format of returned data. xml, text, json.oAjax.RunAJAX();}jQuery('#atc_msg_product, #atc_msg_notice').empty();}/** * This will perform an ajax get request on the ORDERFRONTURL's * showcart.asp page to create a cookie of the SSL domain to * maintain session information such as the shopping cart. * * @authorlroselli * @since04/10/2013 */function fncBuildSSLCookie() {// ddara - 9/22/2014// This is only required when the SSL is on a domain that is different from the rest of the site.// We must strip the protocol since they are often times different, even if the domains are the same.// ASP detected that the storefront and orderfront domains are the same and thus the SSL// cookie pass through is not required.} //- fncBuildSSLCookie/** * This function handles calling the add to cart page via ajax for * a single product key. * * @authorjohns * @since03/19/2013 * * @modifiedjohns - 3/19/2013: added param "bIsAccessory" and the code w/ it * * @paramp_key (string): key of the product to be added to *cart * @parambIsAccessory (bool): is the call coming from product addon window * * @return */function ajaxAddKeys(p_key, bIsAccessory) {var sStockStatus = '';var sAtcType = 'POST';var sAtcSfx = '_' + p_key;if (bIsAccessory === undefined) {bIsAccessory = false;}var sUomData = '';var sUomType = '';var sUom = '';var sUomStd = '';var iUomSalesConv = 0;var iMaxQty = '';var iMinQty = '';try {$qtybox = jQuery('#qty_' + p_key);var iQtyMultiplier = jQuery('#multiplier_on_qty_display_' + p_key).val();if (iQtyMultiplier === undefined) {iQtyMultiplier = 1;}if (bShowSalesUOM) {sUomType = jQuery('#uom_type_' + p_key).val();sUom = jQuery('#uom_' + sUomType + '_' + p_key).val();sUomStd = jQuery('#uom_std_' + p_key).val();iUomSalesConv = jQuery('#uom_conv_' + p_key).val();sUomData += '&uom=' + sUom + '&uomconv=' + iUomSalesConv + '&uomtype=' + sUomType;if (bShowNativeUOMinCart) {sUomData += '&stduom=' + sUomStd;}}var sQty = $qtybox.val();var sProduct;var sProductImage;var $container;if (jQuery('#prod_item_' + p_key).length > 0) {// product html for gallery view$container = jQuery('#prod_item_' + p_key).children('.prod_item_pad');sProductName = $container.children('.nm').html();sInStock = jQuery('#in_stock_' + p_key).val();if (sInStock !== undefined && sInStock !== '') {sStockStatus = '&in_stock_' + p_key + '=' + sInStock;}jQuery('#atc_msg_product').addClass('prod_item');sProductImage = '
' + $container.children('.thumb').html() + '
';if ($container.children('.thumb').html() === null || typeof $container.children('.thumb').html() == 'undefined') {sProductImage = '';}sProduct = sProductImage + '' + sProductName + ' (' + sQty + ')';} else {// product html for list view$container = jQuery('#' + p_key);sProdName = $container.children('td.product_desc').children('p').html();sProdImage = $container.children('td.product_thumb').html();if (sProdImage === null || typeof sProdImage == 'undefined') {sProdImage = '';}sProduct = sProdImage + '' + sProdName + ' (' + sQty + ')';} //- if ( jQuery('#prod_item_' + p_key).length > 0 )var sPWID = '&pw_id' + sAtcSfx + '=' + (jQuery('#pw_id_' + p_key).val() || '');if (parseFloat(sQty) > 0) {if (bUsingOrderDetailTableForCarts) {jQuery.ajax({url: 'i_i_add_to_cart.asp?ajax=listview&action=postlogic',data: 'type=ajaxadd&key=' + p_key + '&qty'+sAtcSfx+'=' + sQty + '&maxqty'+sAtcSfx+'='+iMaxQty + '&minqty'+sAtcSfx+'=' +iMinQty + '&multiplier_on_qty_display'+sAtcSfx+'='+iQtyMultiplier + sStockStatus + sUomData + sPWID,cache: false,type: sAtcType,dataType: 'json',success: function (jsonOrder) {handleAjaxATCSuccess(bIsAccessory, p_key, sProduct, jsonOrder);},complete: function (jsonOrder) {// Enable the ATC button for the particular product that it was clicked on.$('button.order_btn[data-pkey="' + p_key + '"]').prop('disabled', false).children('i.icon-spinner').remove();},error: function (XMLHttpRequest, textStatus, errorThrown) {alert('Error: ' + errorThrown);}});} else {jQuery.ajax({url: 'i_i_add_to_cart.asp?ajax=listview',data: 'type=ajaxadd&key=' + p_key + '&qty'+sAtcSfx+'=' + sQty + sStockStatus + sUomData,cache: false,type: sAtcType,dataType: 'text',error: function (jqXHR, textStatus, errorThrown) {alert('Error: ' + errorThrown);},success: function (oData) {handleAjaxATCSuccess(bIsAccessory, p_key, sProduct, oData);},complete: function () {// Enable the ATC button for the particular product that it was clicked on.$('button.order_btn[data-pkey="' + p_key + '"]').prop('disabled', false).children('i.icon-spinner').remove();}});} //- if ( bUsingOrderDetailTableForCarts )return true;} else {return false;}} catch (oError) {jQuery('.atc_msg').hide()return false;}} //- function ajaxAddKeys/** * This function the success of the ajax ATC call. * * @authorjohns * @since03/19/2013 * * @paramsP_Key (string): key of the product detail page loaded * @param$oProd (jQuery object): contains the html of the product info *to be loaded in the modal popup window * @parambIsAccessory (bool): is the call coming from product addon window * * @returnvoid */function handleAjaxATCSuccess(bIsAccessory, sP_Key, $oProd, jsonOrder) {/* * added js var to perform based on whether or not the item just added was an addon product * johns - 02/20/2013 */if ( bShowRecommendedItems && bIsAccessory ) {jQuery('#atc_msg_product').html('');jQuery('#qty_' + sP_Key).val('');jQuery('#atc_msg').css('height', '400px');} else if ( bShowRecommendedItems && ! bIsAccessory ) {jQuery('#atc_msg_product').html($oProd);jQuery.get('i_i_pc_add_ons.asp?searchstring=searchexact~p_id~' + sP_Key + '&modal=1&display=' + sRecommendedItemsView).done(function ( sData ) {jQuery('#atc_msg_addon_container').html(sData);if ( jQuery('#ors_eof_result').val().toLowerCase() !== 'false' ) { jQuery('#atc_msg').removeClass('with-recommended'); jQuery('.viewport').css('height', '0');jQuery('#atc_msg').show();jQuery('#atc_msg_container').show();} else {jQuery('#atc_msg').show();jQuery('#atc_msg_container').show();} //- if ( jQuery('#ors_result').val().toLowerCase() !== 'false'});jQuery('body').addClass('modal-open');try {if(typeof jsonOrder == 'undefined') {fncCartRefresh();} else {fncCartRefresh(jsonOrder[1].item_count, jsonOrder[1].o_total);}} catch(err) {// Silently fail because this is only relevant// with newer versions of cart preview}/* * normal ajax atc window * johns - 02/20/2013 */} else {jQuery('#atc_msg_product').html($oProd);jQuery('#atc_msg_buttons').show();try {if(typeof jsonOrder == 'undefined') {fncCartRefresh();} else {fncCartRefresh(jsonOrder[1].item_count, jsonOrder[1].o_total);}} catch(err) {// Silently fail because this is only relevant// with newer versions of cart preview}} //- if ( bShowRecommendedItems && bIsAccessory )if (!false) {populateAtcConfirmationModal(sP_Key).done(showAtcConfirmationModal);}runHook('handleAtcSuccess',{ProductKey: sP_Key});} //- function fncHandleAjaxATCSuccess ()if (bDisableATCZeroQtyWarehouse) {jQuery('td').delegate('[id^=pw_id_]', 'change', function(event) {if (jQuery(event.target).children(':selected').text().indexOf("(Qty: 0)") > -1 || jQuery(event.target).children(':selected').text() == "[Select One]") {sKey = jQuery(event.target).attr("id").replace('pw_id_', '')jQuery('#' + sKey + ' .btn_addtocart').attr('disabled', 'disabled')} else {sKey = jQuery(event.target).attr("id").replace('pw_id_', '')jQuery('#' + sKey + ' .btn_addtocart').removeAttr('disabled')}});}jQuery('[id*="get_wh_btn_"]').click(function(){var sPKey = '';sKey = $(this).attr("ID");sPKey = sKey.replace('get_wh_btn_','');fncGetNewProductWarehouse(sPKey);});function populateAtcConfirmationModal(sProductKey) {var aRequirements = [];// Return a promise representing when all the requirements are finished.return jQuery.when.apply(jQuery, aRequirements);}function populatePromoNotificationBar(sProductKey) {return jQuery.ajax({/* Can't use i_i_ page because the necessary classes are in the template. */url: 'pc_combined_results.asp',type: 'GET',dataType: 'html',data: {pageaction: 'promo_notification_bar',p_keys: sProductKey}}).done(function(sData) {if (sData.length > 0) {jQuery('#atc_msg').removeClass('modal-small').addClass('modal-large');jQuery('#atc_promo_bar').html(sData);jQuery('#atc_msg').one('hidden', resetPromotionNotificationBar);// The ticker cannot be started until the elements are visible.jQuery('#atc_msg').one('shown', function () {jQuery('#atc_promo_bar .notification-center').trigger('notification-center-added');});} else {resetPromotionNotificationBar();}}).fail(function() {console.error("Unable to retrive promotion messages");resetPromotionNotificationBar();});}function resetPromotionNotificationBar() {// Disable the notification bar before removing it so the function which runs on an// interval doesn't error on the missing elements.disableNotificationBar(jQuery('#atc_promo_bar'));jQuery('#atc_msg').removeClass('modal-large').addClass('modal-small');jQuery('#atc_promo_bar').empty();}function showAtcConfirmationModal() {jQuery('#atc_msg').modal('show');}function fncGetNewProductWarehouse(sPKey) {try {jQuery.ajax({url: sPageName, data: ({ pageaction : 'getproductwarehouse' ,ajax : genID() ,key : sPKey ,getall : bInStockShowEmptyWarehouses }), cache: false, dataType: "text", async: false, success: function(data){sDefaultWH = jQuery('#pw_id_' + sPKey).val();fncDrawNewProductWarehouse(data,sPKey);if (sDefaultWH.Len == 32) {jQuery('#pw_id_' + sPKey).val(sDefaultWH);} else {jQuery("#pw_id_" + sPKey + " option").not(':contains("Qty: 0")').filter(':first').attr('selected',true);}}}); } catch (err){ //alert(err.message); }}function fncDrawNewProductWarehouse(data,sPKey) {var aWareHouses, aSubWareHouses;var sDisplay;var bSelected = false;if (data!='') {$('#wh_td_' + sPKey).html('');aWareHouses = data.split('|');for (var i = 0; i < aWareHouses.length; i++ ){aSubWareHouses = aWareHouses[i].split('~');sDisplay = aSubWareHouses[0];sPwKey = aSubWareHouses[1];var newOption = new Option(sDisplay, sPwKey);$(newOption).html(sDisplay);$('#pw_id_'+sPKey).append(newOption);}} else {$('#wh_td_' + sPKey).html(sNoWarehouseFound);}}/* * Register Product warehouse selection * vinayakj - 6/29/2012 */jQuery('[name*="pw_id_"]').focus(function() {var sKey = $(this).attr("ID");var sPKey = sKey.replace('pw_id_','');if (jQuery('#pw_id_click_' + sPKey).val() != '1') {fncGetProductWarehouse(sPKey);}});/* * Get Product warehouse * author - vinayakj * since - 6/29/2012 */function fncGetProductWarehouse(sPKey) {try {jQuery.ajax({url: sPageName, data: ({ pageaction : 'getproductwarehouse' ,ajax : genID() ,key : sPKey }), cache: false, dataType: 'text', async: false, success: function(data) {fncDrawProductWarehouse(data, sPKey);jQuery('#pw_id_click_' + sPKey).val('1');$('#pw_id_' + sPKey).val(jQuery('#current_pw_id_' + sPKey).val());}}); } catch (err){ //alert(err.message); }}/* * This will draw Product warehouse with droplist * author - vinayakj * since - 6/29/2012 */function fncDrawProductWarehouse(data,sPKey) {var aWareHouses, aSubWareHouses;var sDisplay;var bSelected = false;$('#pw_id_'+sPKey).empty();//.append('
')if (data!='') {aWareHouses = data.split('|');for (var i =0; i < aWareHouses.length; i++ ){aSubWareHouses = aWareHouses[i].split('~');sDisplay = aSubWareHouses[0];sPwKey = aSubWareHouses[1];$('#pw_id_'+sPKey).append(new Option(sDisplay, sPwKey));}} else {$('#pw_id_'+sPKey).hide();$('#no_warehouse_'+sPKey).show();}}/** * Function to get sub search value and action, then passed to location * @author pijushb * @since 7/3/2012 */function subSearchForm() {sSubSearch = jQuery("#sub_search").val();sActionLink = jQuery("#sub_search_form").attr("action");sRedirectURL = sActionLink + "&sub_search="+sSubSearchwindow.location = sRedirectURL}//Added styled modal to use instead of alert() -JMSfunction styled_modal_alert(htmlmsg) {jQuery('#styled_modal_text').html(htmlmsg);jQuery('#styled_modal_container').show();jQuery('#styled_modal_msg').show();jQuery('#styled_modal_buttons').show();jQuery('body').addClass('modal-open page-overflow');}jQuery('#styled_modal_close').click(function(e){e.preventDefault();jQuery('#styled_modal_container').hide();jQuery('#styled_modal_msg').hide();jQuery('#styled_modal_buttons').hide();jQuery('#styled_modal_text').html('');jQuery('body').removeClass('modal-open page-overflow');});/** * Rating Stars * - gets score from data attribute on container * @author jonr * @since 1/27/2014 */jQuery(function ($) {$('.raty').raty({path: 'templates/gfx/',space: false,readOnly: true,width: 90,hints: ['Bad', 'Poor', 'Good', 'Very Good', 'Excellent'],score: function () { return $(this).attr('data-score'); }});// ddara - 9/22/2014// Once the ATC window is closed, call the close function to update the "My Cart" window// in the navbar at the top.$('#atc_msg').on('hidden', function () {closeCartLightbox();});// force HTML5 validation for the "step" attribute to not fire if the form has at least 1 input with step attribute set to a value > 1 [johns - 02/26/2016]$('form input').each(function() {if ($(this)[0].hasAttribute('step') && ( $(this).attr('step') !== '' || $(this).attr('step') > 1 )) {$('form').attr('novalidate', 'novalidate');return false;}});});// Broken Image Replacementvar utils = {};utils.handleImageError = function (img) {if ($(img).attr('src') !== 'images/no-image.png')$(img).attr('src', 'images/no-image.png');};
Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.