Home |oilfield machine shop

Home


<![CDATA[]]> <![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[<![CDATA[<![CDATA[ $(document).ready(function() { // Magnific Popup Options for Images $('.gallery').each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: ' <![CDATA[]]> <![CDATA[]]> <![CDATA[]]>

Sort by:

Choose… Date: Newest to Oldest Date: Oldest to Newest Manufacturer: A-Z Manufacturer: Z-A Price: Highest to Lowest Price: Lowest to Highest Title: A-Z Title: Z-A

 

Loading... <![CDATA[‘0’){ $(‘#markdowns_tri_buttons’).show(); $(‘#markdowns_tri_buttons_responsive’).show(); } }); $(“#e_search_text”).keyup(function(event){ if(event.keyCode == 13){ $(“#e_search_button”).click(); } }); ]]]]]]>]]]]>]]> <![CDATA[]]> <![CDATA[]]>

 

<![CDATA[]]> View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-1:hidden').length) { }else{ get_thumbs(1, 21853, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0522/0522087/20220524112457939_L.JPG', '', '0522-087-0003') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-1:hidden').length) { }else{ get_thumbs(1, 21853, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0522/0522087/20220524112457939_L.JPG', '', '0522-087-0003') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0522-087-0003
Quantity
1
Manufacturer
W & Z Machinery Systems
Model Number
HC-05PACJ
Serial Number
1105055
Make Year
2011
Capacity Electrical
Dimensions L x W x H (inches)
27 x 43 x 54
Weight (lb)
565
Showroom Aisle
07B
Showroom Bay
1100
Category
Plastics
Location
Euclid, OH
Item Details

W & Z Machinery Systems

W & Z Machinery Systems Hc-05pacj Chiller

Euclid, OH

$447.00 $559 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_05220870003' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_05220870003(); build_foxycart_form_05220870003(); $('#shp_type_05220870003').val('PICKUP'); $('#shp_name_05220870003').val('PICKUP') $('#shp_price_05220870003').val('$0.00'); $('#hand_fee_05220870003').val('$0.00'); $('#shp_zip_05220870003').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_05220870003(); $('#form_email_05220870003').show(); build_foxycart_form_05220870003(); $('#continue_rates_05220870003').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_05220870003(); $('#form_email_05220870003').show(); $('#continue_email_05220870003 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_05220870003' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_05220870003(); // populate and show zip code / country form and zip code button //zip_code_empty_html_05220870003(); // $('#form_zip_05220870003').show(); // $('#continue_zip_05220870003 ').show(); // $('#continue_international_05220870003 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_05220870003(); $('#form_email_05220870003').show(); // poplate and show zip zip_code_empty_html_05220870003(); $('#form_zip_05220870003').show(); $('#continue_zip_05220870003 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_05220870003(); $('#form_email_05220870003').show(); $('#continue_email_05220870003 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_05220870003' ,function(){ //abort rates post if exists if (typeof rates_post_05220870003 !== 'undefined') { rates_post_05220870003.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_05220870003('form_email_05220870003'); hide_me_05220870003('form_zip_05220870003'); hide_me_05220870003('form_res_type_05220870003'); hide_me_05220870003('form_dock_type_05220870003'); hide_me_05220870003('form_api_rates_05220870003'); hide_me_05220870003('form_foxy_form_05220870003'); hide_me_05220870003('loading_gif_05220870003'); hide_me_05220870003('continue_rates_05220870003'); hide_me_05220870003('continue_zip_05220870003'); hide_me_05220870003('continue_email_05220870003'); hide_me_05220870003('continue_international_05220870003'); clear_me_05220870003('form_email_05220870003'); clear_me_05220870003('form_zip_05220870003'); clear_me_05220870003('form_res_type_05220870003'); clear_me_05220870003('form_dock_type_05220870003'); clear_me_05220870003('form_api_rates_05220870003'); clear_me_05220870003('form_foxy_form_05220870003'); clear_me_05220870003('loading_gif_05220870003'); // reset all forms delivery_type_empty_html_05220870003(); zip_code_empty_html_05220870003(); res_add_empty_html_05220870003(); dock_add_empty_html_05220870003(); email_empty_html_05220870003(); // align info left $('#form_delivery_type_05220870003').attr('align','center') // show directions lang $('#pls_asw_05220870003').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_05220870003').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_05220870003=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_05220870003=='1'){ // build fc form build_foxycart_form_05220870003(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_05220870003').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_05220870003').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_05220870003').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_05220870003').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0522-087-0003" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_05220870003').val('HGR To Assist'); $('#shp_price_05220870003').val('$0.00'); $('#hand_fee_05220870003').val('$0.00'); // submit fc form $('#foxy_cart_final_form_05220870003').submit(); // clear form data $('#form_foxy_form_05220870003').html(''); // hide the modal $('#modal_05220870003').modal('hide'); clear_foxy_cart_form_05220870003(); // change add to cart button status to added add_to_cart_status('add', '05220870003'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_05220870003=localStorage.getItem("atc_international"); if(is_international_ship_set_05220870003=='1'){ // build fc form build_foxycart_form_05220870003(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_05220870003').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_05220870003').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_05220870003').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_05220870003').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0522-087-0003" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_05220870003').val('HGR To Assist'); $('#shp_name_05220870003').val('HGR To Assist'); $('#shp_price_05220870003').val('TBD'); $('#hand_fee_05220870003').val('TBD'); // submit fc form $('#foxy_cart_final_form_05220870003').submit(); // clear form data $('#form_foxy_form_05220870003').html(''); // hide the modal $('#modal_05220870003').modal('hide'); clear_foxy_cart_form_05220870003(); // change add to cart button status to added add_to_cart_status('add', '05220870003'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_05220870003(); $('#form_delivery_type_05220870003').show(); // hide pls_asw_ hide_me_05220870003('pls_asw_05220870003'); //// populate and show zip form // zip_code_empty_html_05220870003(); // $('#form_zip_05220870003').show(); // $('#continue_zip_05220870003 ').show(); // $('#continue_international_05220870003 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_05220870003(); $('#form_email_05220870003').show(); // poplate and show zip zip_code_empty_html_05220870003(); $('#form_zip_05220870003').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_05220870003(); $('#form_email_05220870003').show(); $('#continue_email_05220870003 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_05220870003(); $('#form_delivery_type_05220870003').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_05220870003(); $('#shp_type_05220870003').val('PICKUP'); $('#shp_name_05220870003').val('PICKUP') $('#shp_price_05220870003').val('$0.00'); $('#shp_zip_05220870003').val('00000'); $('#hand_fee_05220870003').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_05220870003(); $('#form_email_05220870003').show(); build_foxycart_form_05220870003(); $('#continue_rates_05220870003').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_05220870003(); $('#form_email_05220870003').show(); $('#continue_email_05220870003 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_05220870003(); $('#form_delivery_type_05220870003').show(); } }); }); function delivery_type_empty_html_05220870003(){ // change header lang $('#ModalLabel05220870003').html(''); $('#ModalLabel05220870003').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_05220870003').html(''); $('#pls_asw_05220870003').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_05220870003’).html(“); // populate form delivery_type html $(‘#form_delivery_type_05220870003’).html(`

`); } function delivery_type_set_html_05220870003(){ if(max_qty_avail_05220870003>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel05220870003’).html(”); $(‘#ModalLabel05220870003’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_05220870003’).hide(); $(‘#is_pickup_05220870003’).hide(); // align info left $(‘#form_delivery_type_05220870003’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_05220870003’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_05220870003’).hide(); // center the directions lang $(‘#form_delivery_type_05220870003’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_05220870003’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel05220870003’).html(”); $(‘#ModalLabel05220870003’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_05220870003’).hide(); $(‘#is_pickup_05220870003’).hide(); // align info left $(‘#form_delivery_type_05220870003’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_05220870003’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_05220870003’).hide(); // center the directions lang $(‘#form_delivery_type_05220870003’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_05220870003’ ,function(){ jQuery(‘#modal_05220870003’).modal(‘hide’); jQuery(‘#modal_qty_05220870003’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_05220870003" ).click(function() { // if email valid if($('#ship_email_05220870003').val() !='' && validateEmail($('#ship_email_05220870003').val())===true){ // set email/country val atc_email_val = $('#ship_email_05220870003').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_05220870003(); // hide contine email & international buttons $('#continue_email_05220870003').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_05220870003(); $('#form_zip_05220870003').show(); $('#continue_zip_05220870003').show(); $('#continue_international_05220870003 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_05220870003(); $('#continue_rates_05220870003').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_05220870003' ,function(){ //abort rates post if exists if (typeof rates_post_05220870003 !== 'undefined') { rates_post_05220870003.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_05220870003 ').hide(); $('#continue_zip_05220870003 ').hide(); $('#continue_international_05220870003 ').hide(); // empty and show email/country form email_empty_html_05220870003(); // show contine email/iternational button $('#continue_email_05220870003').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_05220870003('form_zip_'); hide_me_05220870003('form_zip_'); // empty res form //clear_me_05220870003('form_res_type_'); hide_me_05220870003('form_res_type_'); // empty loading div //clear_me_05220870003('loading_gif_'); hide_me_05220870003('loading_gif_'); // empty rates form //clear_me_05220870003('form_api_rates_'); hide_me_05220870003('form_api_rates_'); // hide rates continue button hide_me_05220870003('continue_rates'); // empty doctype form //clear_me_05220870003('form_dock_type_'); hide_me_05220870003('form_dock_type_'); // empty foxy form //clear_me_05220870003('form_foxy_form_'); //hide_me_05220870003('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_05220870003]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_05220870003').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_05220870003(); // hide contine email / international button $('#continue_email_05220870003').hide(); $('#form_email_05220870003').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_05220870003(); $('#form_zip_05220870003').show(); $('#continue_zip_05220870003').show(); $('#continue_international_05220870003 ').show(); } } }); }); function email_empty_html_05220870003(){ // clear form email html $('#form_email_05220870003').html(“); // populate form email html $('#form_email_05220870003').html(` 1. What is your email address? `); } function email_set_html_05220870003(){ // clear form email html $('#form_email_05220870003').html(“); // populate form email html $('#form_email_05220870003').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_05220870003" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_05220870003').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_05220870003').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_05220870003(); // hide contine zip & international buttons $('#continue_zip_05220870003').hide(); $('#continue_international_05220870003').hide(); // Show empty residential form res_add_empty_html_05220870003(); $('#form_res_type_05220870003').show(); }); } }); // END click contine zip // START click international $( "#continue_international_05220870003" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_05220870003(); // hide contine zip & international buttons $('#continue_zip_05220870003').hide(); $('#continue_international_05220870003').hide(); $('#chosen_rate').html(''); $('#form_api_rates_05220870003').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_05220870003(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_05220870003’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_05220870003_99’).click(); $(‘#form_api_rates_05220870003’).show(); $(‘#continue_rates_05220870003’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_05220870003’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_05220870003 !== ‘undefined’) { rates_post_05220870003.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_05220870003(); // show contine zip/iternational button $(‘#continue_zip_05220870003’).show(); $(‘#continue_international_05220870003’).show(); hide_me_05220870003(‘form_res_type_05220870003’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_05220870003]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_05220870003(); // clear dock type cookie and local storage clear_dock_type_storage_05220870003(); // empty res form clear_me_05220870003(‘form_res_type_’); hide_me_05220870003(‘form_res_type_’); // empty loading div clear_me_05220870003(‘loading_gif_’); hide_me_05220870003(‘loading_gif_’); // empty rates form clear_me_05220870003(‘form_api_rates_’); hide_me_05220870003(‘form_api_rates_’); // hide rates continue button hide_me_05220870003(‘continue_rates’); // empty doctype form clear_me_05220870003(‘form_dock_type_’); hide_me_05220870003(‘form_dock_type_’); // empty foxy form clear_me_05220870003(‘form_foxy_form_’); hide_me_05220870003(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_05220870003]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_05220870003’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_05220870003(); // hide contine zip / international button $(‘#continue_zip_05220870003’).hide(); $(‘#continue_international_05220870003’).hide(); $(‘#continue_rates_05220870003’).hide(); // poplate and show res form res_add_empty_html_05220870003(); $(‘#form_res_type_05220870003’).show(); } }); }); function zip_code_empty_html_05220870003(){ // clear form zip html $(‘#form_zip_05220870003’).html(“); // populate form zip html $(‘#form_zip_05220870003’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_05220870003(){ // clear form zip html $(‘#form_zip_05220870003’).html(“); // populate form zip html $(‘#form_zip_05220870003’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_05220870003(yes_no){ $(‘#form_res_type_05220870003’).html(“); // populate form res html $(‘#form_res_type_05220870003’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_05220870003(yes_no){ $(‘#form_dock_type_05220870003’).html(“); // populate dock form html $(‘#form_dock_type_05220870003’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_05220870003; function get_rates_05220870003(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_05220870003=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_05220870003=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0522-087-0003'; rates_atc_item_price='447.00'; rates_atc_name='W & Z Machinery Systems Hc-05pacj Chiller'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='565'; rates_atc_length='27'; rates_atc_width='43'; rates_atc_height='54'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0522/0522087/20220524112457782_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_05220870003').html(''); $('#form_api_rates_05220870003').hide(); $('#pls_asw_05220870003').hide(); $('#loading_gif_05220870003').html(''); $('#loading_gif_05220870003').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_05220870003’).show(); //send data to api rates_post_05220870003 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0522-087-0003’, rates_atc_itemname_post: ‘W & Z Machinery Systems Hc 05pacj Chiller’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘447.00’ }, function( data ) { //// start test post url //rates_post_05220870003 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_05220870003’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_05220870003=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_05220870003.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_05220870003’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_05220870003.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_05220870003’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_05220870003’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_05220870003(); $(‘#shp_type_05220870003’).val(‘TBD’); $(‘#shp_name_05220870003’).val(‘TBD’) $(‘#shp_price_05220870003’).val(‘TBD’); $(‘#hand_fee_05220870003’).val(‘TBD’); $(‘#continue_rates_05220870003’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_05220870003’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_05220870003’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_05220870003’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_05220870003(); $(‘#shp_type_05220870003’).val(‘TBD’); $(‘#shp_name_05220870003’).val(‘TBD’) $(‘#shp_price_05220870003’).val(‘TBD’); $(‘#hand_fee_05220870003’).val(‘TBD’); //rate_item_price_05220870003=’447.00′; // $(‘#price’).val((Number(rate_item_price_05220870003) + Number(rate_info_price_05220870003)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_05220870003’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_05220870003’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_05220870003’).append(”); // clear and hide the loading gif $(‘#loading_gif_05220870003’).html(”); $(‘#loading_gif_05220870003’).hide(); // show the shipping rates div $(‘#form_api_rates_05220870003’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_05220870003.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_05220870003’).html(”); $(‘#form_api_rates_05220870003’).hide(); //$(‘#pls_asw_05220870003’).show(); $(‘#loading_gif_05220870003’).html(”); $(‘#loading_gif_05220870003’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_05220870003').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_05220870003').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_05220870003').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel05220870003').html(''); //$('#ModalLabel05220870003').html(`Delivery Type`); //// change directions lang //$('#pls_asw_05220870003').html(''); //$('#pls_asw_05220870003').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_05220870003’).show(); //// show delivery type buttons //$(‘#is_ship_05220870003’).show(); //$(‘#is_pickup_05220870003’).show(); //zip_code_empty_html_05220870003(); //res_add_empty_html_05220870003(); //dock_add_empty_html_05220870003(); //delivery_type_empty_html_05220870003(); // //$(‘#loading_gif_05220870003’).html(”); //$(‘#loading_gif_05220870003’).hide(); //$(‘#form_api_rates_05220870003’).html(”); //$(‘#form_api_rates_05220870003’).hide(); hide_me_05220870003(‘form_delivery_type_05220870003’); hide_me_05220870003(‘form_zip_05220870003’); hide_me_05220870003(‘form_res_type_05220870003’); hide_me_05220870003(‘form_dock_type_05220870003’); hide_me_05220870003(‘form_api_rates_05220870003’); hide_me_05220870003(‘form_foxy_form_05220870003’); hide_me_05220870003(‘loading_gif_05220870003’); hide_me_05220870003(‘continue_rates_05220870003’); hide_me_05220870003(‘continue_zip_05220870003’); hide_me_05220870003(‘continue_international_05220870003’); clear_me_05220870003(‘form_delivery_type_05220870003’); clear_me_05220870003(‘form_zip_05220870003’); clear_me_05220870003(‘form_res_type_05220870003’); clear_me_05220870003(‘form_dock_type_05220870003’); clear_me_05220870003(‘form_api_rates_05220870003’); clear_me_05220870003(‘form_foxy_form_05220870003’); clear_me_05220870003(‘loading_gif_05220870003’); }); }); // hide id starting with function hide_me_05220870003(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_05220870003(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_05220870003(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_05220870003(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_05220870003’).modal(‘hide’); jQuery(‘#modal_05220870003’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_05220870003(){ // clear form zip html $(‘#form_qty_05220870003’).html(“); // populate form zip html $(‘#form_qty_05220870003’).html(`

How many would you like?(`+max_qty_avail_05220870003+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0522-087-0003” }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0522-087-0003’, ‘page_type’: ‘search results page’,’price’: ‘447.00’,’category’: ‘Plastics’,’brand’: ‘W & Z Machinery Systems’, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0522-087-0003’, ‘447.00’); // END HT $(‘#favorites_heart_icon_0522-087-0003_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0522-087-0003_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0522-087-0003_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-2:hidden').length) { }else{ get_thumbs(2, 16766, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0922034/20221012090527747_L.JPG', '', '0922-034-0025') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-2:hidden').length) { }else{ get_thumbs(2, 16766, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0922034/20221012090527747_L.JPG', '', '0922-034-0025') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0922-034-0025
Quantity
1
Manufacturer
American Saw Mill Machinery Co.
Model Number
Serial Number Make Year
Capacity
35 1/2 X 23″
Electrical
3/60/220/440
Dimensions L x W x H (inches)
71 x 43 x 115
Weight (lb)
3515
Showroom Aisle
12B
Showroom Bay
1500
Category
Fabrication
Location
Euclid, OH
Item Details
36″ X 29″ Table, 1/3″ Bore, 5 Hp, 860 Rpm

American Saw Mill Machinery Co.

American Saw Mill Machinery Co. Vertical Band Saw

Euclid, OH

$623 $779 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_09220340025' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_09220340025(); build_foxycart_form_09220340025(); $('#shp_type_09220340025').val('PICKUP'); $('#shp_name_09220340025').val('PICKUP') $('#shp_price_09220340025').val('$0.00'); $('#hand_fee_09220340025').val('$0.00'); $('#shp_zip_09220340025').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09220340025(); $('#form_email_09220340025').show(); build_foxycart_form_09220340025(); $('#continue_rates_09220340025').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09220340025(); $('#form_email_09220340025').show(); $('#continue_email_09220340025 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_09220340025' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_09220340025(); // populate and show zip code / country form and zip code button //zip_code_empty_html_09220340025(); // $('#form_zip_09220340025').show(); // $('#continue_zip_09220340025 ').show(); // $('#continue_international_09220340025 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09220340025(); $('#form_email_09220340025').show(); // poplate and show zip zip_code_empty_html_09220340025(); $('#form_zip_09220340025').show(); $('#continue_zip_09220340025 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09220340025(); $('#form_email_09220340025').show(); $('#continue_email_09220340025 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_09220340025' ,function(){ //abort rates post if exists if (typeof rates_post_09220340025 !== 'undefined') { rates_post_09220340025.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_09220340025('form_email_09220340025'); hide_me_09220340025('form_zip_09220340025'); hide_me_09220340025('form_res_type_09220340025'); hide_me_09220340025('form_dock_type_09220340025'); hide_me_09220340025('form_api_rates_09220340025'); hide_me_09220340025('form_foxy_form_09220340025'); hide_me_09220340025('loading_gif_09220340025'); hide_me_09220340025('continue_rates_09220340025'); hide_me_09220340025('continue_zip_09220340025'); hide_me_09220340025('continue_email_09220340025'); hide_me_09220340025('continue_international_09220340025'); clear_me_09220340025('form_email_09220340025'); clear_me_09220340025('form_zip_09220340025'); clear_me_09220340025('form_res_type_09220340025'); clear_me_09220340025('form_dock_type_09220340025'); clear_me_09220340025('form_api_rates_09220340025'); clear_me_09220340025('form_foxy_form_09220340025'); clear_me_09220340025('loading_gif_09220340025'); // reset all forms delivery_type_empty_html_09220340025(); zip_code_empty_html_09220340025(); res_add_empty_html_09220340025(); dock_add_empty_html_09220340025(); email_empty_html_09220340025(); // align info left $('#form_delivery_type_09220340025').attr('align','center') // show directions lang $('#pls_asw_09220340025').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_09220340025').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_09220340025=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09220340025=='1'){ // build fc form build_foxycart_form_09220340025(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09220340025').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09220340025').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09220340025').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09220340025').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-034-0025" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_09220340025').val('HGR To Assist'); $('#shp_price_09220340025').val('$0.00'); $('#hand_fee_09220340025').val('$0.00'); // submit fc form $('#foxy_cart_final_form_09220340025').submit(); // clear form data $('#form_foxy_form_09220340025').html(''); // hide the modal $('#modal_09220340025').modal('hide'); clear_foxy_cart_form_09220340025(); // change add to cart button status to added add_to_cart_status('add', '09220340025'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_09220340025=localStorage.getItem("atc_international"); if(is_international_ship_set_09220340025=='1'){ // build fc form build_foxycart_form_09220340025(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09220340025').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09220340025').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09220340025').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09220340025').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-034-0025" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_09220340025').val('HGR To Assist'); $('#shp_name_09220340025').val('HGR To Assist'); $('#shp_price_09220340025').val('TBD'); $('#hand_fee_09220340025').val('TBD'); // submit fc form $('#foxy_cart_final_form_09220340025').submit(); // clear form data $('#form_foxy_form_09220340025').html(''); // hide the modal $('#modal_09220340025').modal('hide'); clear_foxy_cart_form_09220340025(); // change add to cart button status to added add_to_cart_status('add', '09220340025'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_09220340025(); $('#form_delivery_type_09220340025').show(); // hide pls_asw_ hide_me_09220340025('pls_asw_09220340025'); //// populate and show zip form // zip_code_empty_html_09220340025(); // $('#form_zip_09220340025').show(); // $('#continue_zip_09220340025 ').show(); // $('#continue_international_09220340025 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09220340025(); $('#form_email_09220340025').show(); // poplate and show zip zip_code_empty_html_09220340025(); $('#form_zip_09220340025').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09220340025(); $('#form_email_09220340025').show(); $('#continue_email_09220340025 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_09220340025(); $('#form_delivery_type_09220340025').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_09220340025(); $('#shp_type_09220340025').val('PICKUP'); $('#shp_name_09220340025').val('PICKUP') $('#shp_price_09220340025').val('$0.00'); $('#shp_zip_09220340025').val('00000'); $('#hand_fee_09220340025').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_09220340025(); $('#form_email_09220340025').show(); build_foxycart_form_09220340025(); $('#continue_rates_09220340025').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_09220340025(); $('#form_email_09220340025').show(); $('#continue_email_09220340025 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_09220340025(); $('#form_delivery_type_09220340025').show(); } }); }); function delivery_type_empty_html_09220340025(){ // change header lang $('#ModalLabel09220340025').html(''); $('#ModalLabel09220340025').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_09220340025').html(''); $('#pls_asw_09220340025').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_09220340025’).html(“); // populate form delivery_type html $(‘#form_delivery_type_09220340025’).html(`

`); } function delivery_type_set_html_09220340025(){ if(max_qty_avail_09220340025>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel09220340025’).html(”); $(‘#ModalLabel09220340025’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_09220340025’).hide(); $(‘#is_pickup_09220340025’).hide(); // align info left $(‘#form_delivery_type_09220340025’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09220340025’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_09220340025’).hide(); // center the directions lang $(‘#form_delivery_type_09220340025’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_09220340025’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel09220340025’).html(”); $(‘#ModalLabel09220340025’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_09220340025’).hide(); $(‘#is_pickup_09220340025’).hide(); // align info left $(‘#form_delivery_type_09220340025’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09220340025’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_09220340025’).hide(); // center the directions lang $(‘#form_delivery_type_09220340025’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_09220340025’ ,function(){ jQuery(‘#modal_09220340025’).modal(‘hide’); jQuery(‘#modal_qty_09220340025’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_09220340025" ).click(function() { // if email valid if($('#ship_email_09220340025').val() !='' && validateEmail($('#ship_email_09220340025').val())===true){ // set email/country val atc_email_val = $('#ship_email_09220340025').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_09220340025(); // hide contine email & international buttons $('#continue_email_09220340025').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_09220340025(); $('#form_zip_09220340025').show(); $('#continue_zip_09220340025').show(); $('#continue_international_09220340025 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_09220340025(); $('#continue_rates_09220340025').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_09220340025' ,function(){ //abort rates post if exists if (typeof rates_post_09220340025 !== 'undefined') { rates_post_09220340025.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_09220340025 ').hide(); $('#continue_zip_09220340025 ').hide(); $('#continue_international_09220340025 ').hide(); // empty and show email/country form email_empty_html_09220340025(); // show contine email/iternational button $('#continue_email_09220340025').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_09220340025('form_zip_'); hide_me_09220340025('form_zip_'); // empty res form //clear_me_09220340025('form_res_type_'); hide_me_09220340025('form_res_type_'); // empty loading div //clear_me_09220340025('loading_gif_'); hide_me_09220340025('loading_gif_'); // empty rates form //clear_me_09220340025('form_api_rates_'); hide_me_09220340025('form_api_rates_'); // hide rates continue button hide_me_09220340025('continue_rates'); // empty doctype form //clear_me_09220340025('form_dock_type_'); hide_me_09220340025('form_dock_type_'); // empty foxy form //clear_me_09220340025('form_foxy_form_'); //hide_me_09220340025('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_09220340025]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_09220340025').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_09220340025(); // hide contine email / international button $('#continue_email_09220340025').hide(); $('#form_email_09220340025').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_09220340025(); $('#form_zip_09220340025').show(); $('#continue_zip_09220340025').show(); $('#continue_international_09220340025 ').show(); } } }); }); function email_empty_html_09220340025(){ // clear form email html $('#form_email_09220340025').html(“); // populate form email html $('#form_email_09220340025').html(` 1. What is your email address? `); } function email_set_html_09220340025(){ // clear form email html $('#form_email_09220340025').html(“); // populate form email html $('#form_email_09220340025').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_09220340025" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_09220340025').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_09220340025').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_09220340025(); // hide contine zip & international buttons $('#continue_zip_09220340025').hide(); $('#continue_international_09220340025').hide(); // Show empty residential form res_add_empty_html_09220340025(); $('#form_res_type_09220340025').show(); }); } }); // END click contine zip // START click international $( "#continue_international_09220340025" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_09220340025(); // hide contine zip & international buttons $('#continue_zip_09220340025').hide(); $('#continue_international_09220340025').hide(); $('#chosen_rate').html(''); $('#form_api_rates_09220340025').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_09220340025(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_09220340025’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_09220340025_99’).click(); $(‘#form_api_rates_09220340025’).show(); $(‘#continue_rates_09220340025’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_09220340025’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_09220340025 !== ‘undefined’) { rates_post_09220340025.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_09220340025(); // show contine zip/iternational button $(‘#continue_zip_09220340025’).show(); $(‘#continue_international_09220340025’).show(); hide_me_09220340025(‘form_res_type_09220340025’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_09220340025]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_09220340025(); // clear dock type cookie and local storage clear_dock_type_storage_09220340025(); // empty res form clear_me_09220340025(‘form_res_type_’); hide_me_09220340025(‘form_res_type_’); // empty loading div clear_me_09220340025(‘loading_gif_’); hide_me_09220340025(‘loading_gif_’); // empty rates form clear_me_09220340025(‘form_api_rates_’); hide_me_09220340025(‘form_api_rates_’); // hide rates continue button hide_me_09220340025(‘continue_rates’); // empty doctype form clear_me_09220340025(‘form_dock_type_’); hide_me_09220340025(‘form_dock_type_’); // empty foxy form clear_me_09220340025(‘form_foxy_form_’); hide_me_09220340025(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_09220340025]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_09220340025’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_09220340025(); // hide contine zip / international button $(‘#continue_zip_09220340025’).hide(); $(‘#continue_international_09220340025’).hide(); $(‘#continue_rates_09220340025’).hide(); // poplate and show res form res_add_empty_html_09220340025(); $(‘#form_res_type_09220340025’).show(); } }); }); function zip_code_empty_html_09220340025(){ // clear form zip html $(‘#form_zip_09220340025’).html(“); // populate form zip html $(‘#form_zip_09220340025’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_09220340025(){ // clear form zip html $(‘#form_zip_09220340025’).html(“); // populate form zip html $(‘#form_zip_09220340025’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_09220340025(yes_no){ $(‘#form_res_type_09220340025’).html(“); // populate form res html $(‘#form_res_type_09220340025’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_09220340025(yes_no){ $(‘#form_dock_type_09220340025’).html(“); // populate dock form html $(‘#form_dock_type_09220340025’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_09220340025; function get_rates_09220340025(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_09220340025=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09220340025=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0922-034-0025'; rates_atc_item_price='623.00'; rates_atc_name='American Saw Mill Machinery Co. Vertical Band Saw'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='3515'; rates_atc_length='71'; rates_atc_width='43'; rates_atc_height='115'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/1022/0922034/20221012090527603_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_09220340025').html(''); $('#form_api_rates_09220340025').hide(); $('#pls_asw_09220340025').hide(); $('#loading_gif_09220340025').html(''); $('#loading_gif_09220340025').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_09220340025’).show(); //send data to api rates_post_09220340025 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0922-034-0025’, rates_atc_itemname_post: ‘American Saw Mill Machinery Co. Vertical Band Saw’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘623.00’ }, function( data ) { //// start test post url //rates_post_09220340025 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_09220340025’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_09220340025=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_09220340025.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_09220340025’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_09220340025.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_09220340025’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_09220340025’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09220340025(); $(‘#shp_type_09220340025’).val(‘TBD’); $(‘#shp_name_09220340025’).val(‘TBD’) $(‘#shp_price_09220340025’).val(‘TBD’); $(‘#hand_fee_09220340025’).val(‘TBD’); $(‘#continue_rates_09220340025’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_09220340025’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_09220340025’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_09220340025’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09220340025(); $(‘#shp_type_09220340025’).val(‘TBD’); $(‘#shp_name_09220340025’).val(‘TBD’) $(‘#shp_price_09220340025’).val(‘TBD’); $(‘#hand_fee_09220340025’).val(‘TBD’); //rate_item_price_09220340025=’623.00′; // $(‘#price’).val((Number(rate_item_price_09220340025) + Number(rate_info_price_09220340025)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_09220340025’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_09220340025’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_09220340025’).append(”); // clear and hide the loading gif $(‘#loading_gif_09220340025’).html(”); $(‘#loading_gif_09220340025’).hide(); // show the shipping rates div $(‘#form_api_rates_09220340025’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_09220340025.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_09220340025’).html(”); $(‘#form_api_rates_09220340025’).hide(); //$(‘#pls_asw_09220340025’).show(); $(‘#loading_gif_09220340025’).html(”); $(‘#loading_gif_09220340025’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_09220340025').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_09220340025').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_09220340025').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel09220340025').html(''); //$('#ModalLabel09220340025').html(`Delivery Type`); //// change directions lang //$('#pls_asw_09220340025').html(''); //$('#pls_asw_09220340025').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_09220340025’).show(); //// show delivery type buttons //$(‘#is_ship_09220340025’).show(); //$(‘#is_pickup_09220340025’).show(); //zip_code_empty_html_09220340025(); //res_add_empty_html_09220340025(); //dock_add_empty_html_09220340025(); //delivery_type_empty_html_09220340025(); // //$(‘#loading_gif_09220340025’).html(”); //$(‘#loading_gif_09220340025’).hide(); //$(‘#form_api_rates_09220340025’).html(”); //$(‘#form_api_rates_09220340025’).hide(); hide_me_09220340025(‘form_delivery_type_09220340025’); hide_me_09220340025(‘form_zip_09220340025’); hide_me_09220340025(‘form_res_type_09220340025’); hide_me_09220340025(‘form_dock_type_09220340025’); hide_me_09220340025(‘form_api_rates_09220340025’); hide_me_09220340025(‘form_foxy_form_09220340025’); hide_me_09220340025(‘loading_gif_09220340025’); hide_me_09220340025(‘continue_rates_09220340025’); hide_me_09220340025(‘continue_zip_09220340025’); hide_me_09220340025(‘continue_international_09220340025’); clear_me_09220340025(‘form_delivery_type_09220340025’); clear_me_09220340025(‘form_zip_09220340025’); clear_me_09220340025(‘form_res_type_09220340025’); clear_me_09220340025(‘form_dock_type_09220340025’); clear_me_09220340025(‘form_api_rates_09220340025’); clear_me_09220340025(‘form_foxy_form_09220340025’); clear_me_09220340025(‘loading_gif_09220340025’); }); }); // hide id starting with function hide_me_09220340025(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_09220340025(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_09220340025(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_09220340025(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_09220340025’).modal(‘hide’); jQuery(‘#modal_09220340025’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_09220340025(){ // clear form zip html $(‘#form_qty_09220340025’).html(“); // populate form zip html $(‘#form_qty_09220340025’).html(`

How many would you like?(`+max_qty_avail_09220340025+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0922-034-0025” }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0922-034-0025’, ‘page_type’: ‘search results page’,’price’: ‘623.00’,’category’: ‘Fabrication’,’brand’: ‘American Saw Mill Machinery Co.’, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0922-034-0025’, ‘623.00’); // END HT $(‘#favorites_heart_icon_0922-034-0025_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0922-034-0025_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0922-034-0025_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-3:hidden').length) { }else{ get_thumbs(3, 21154, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0722/0722146/20220727115924340_L.JPG', '', '0722-146-0001') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-3:hidden').length) { }else{ get_thumbs(3, 21154, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0722/0722146/20220727115924340_L.JPG', '', '0722-146-0001') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0722-146-0001
Quantity
1
Manufacturer
Consolidated Packaging Machinery Corp/capem
Model Number
S-1-F
Serial Number
3070
Make Year
Capacity
1 POSITION
Electrical
3/60/230/460
Dimensions L x W x H (inches)
68 x 48 x 80
Weight (lb)
1565
Showroom Aisle
09A
Showroom Bay
1600
Category
Packaging
Location
Euclid, OH
Item Details
4 1/2 X 60″ Conveyor, 3/4 Hp

Consolidated Packaging Machinery Corp/capem

Consolidated Packaging Machinery Corp/capem S-1-f Capper

Euclid, OH

$924 $1,155 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_07221460001' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_07221460001(); build_foxycart_form_07221460001(); $('#shp_type_07221460001').val('PICKUP'); $('#shp_name_07221460001').val('PICKUP') $('#shp_price_07221460001').val('$0.00'); $('#hand_fee_07221460001').val('$0.00'); $('#shp_zip_07221460001').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_07221460001(); $('#form_email_07221460001').show(); build_foxycart_form_07221460001(); $('#continue_rates_07221460001').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_07221460001(); $('#form_email_07221460001').show(); $('#continue_email_07221460001 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_07221460001' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_07221460001(); // populate and show zip code / country form and zip code button //zip_code_empty_html_07221460001(); // $('#form_zip_07221460001').show(); // $('#continue_zip_07221460001 ').show(); // $('#continue_international_07221460001 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_07221460001(); $('#form_email_07221460001').show(); // poplate and show zip zip_code_empty_html_07221460001(); $('#form_zip_07221460001').show(); $('#continue_zip_07221460001 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_07221460001(); $('#form_email_07221460001').show(); $('#continue_email_07221460001 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_07221460001' ,function(){ //abort rates post if exists if (typeof rates_post_07221460001 !== 'undefined') { rates_post_07221460001.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_07221460001('form_email_07221460001'); hide_me_07221460001('form_zip_07221460001'); hide_me_07221460001('form_res_type_07221460001'); hide_me_07221460001('form_dock_type_07221460001'); hide_me_07221460001('form_api_rates_07221460001'); hide_me_07221460001('form_foxy_form_07221460001'); hide_me_07221460001('loading_gif_07221460001'); hide_me_07221460001('continue_rates_07221460001'); hide_me_07221460001('continue_zip_07221460001'); hide_me_07221460001('continue_email_07221460001'); hide_me_07221460001('continue_international_07221460001'); clear_me_07221460001('form_email_07221460001'); clear_me_07221460001('form_zip_07221460001'); clear_me_07221460001('form_res_type_07221460001'); clear_me_07221460001('form_dock_type_07221460001'); clear_me_07221460001('form_api_rates_07221460001'); clear_me_07221460001('form_foxy_form_07221460001'); clear_me_07221460001('loading_gif_07221460001'); // reset all forms delivery_type_empty_html_07221460001(); zip_code_empty_html_07221460001(); res_add_empty_html_07221460001(); dock_add_empty_html_07221460001(); email_empty_html_07221460001(); // align info left $('#form_delivery_type_07221460001').attr('align','center') // show directions lang $('#pls_asw_07221460001').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_07221460001').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_07221460001=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_07221460001=='1'){ // build fc form build_foxycart_form_07221460001(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_07221460001').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_07221460001').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_07221460001').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_07221460001').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0722-146-0001" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_07221460001').val('HGR To Assist'); $('#shp_price_07221460001').val('$0.00'); $('#hand_fee_07221460001').val('$0.00'); // submit fc form $('#foxy_cart_final_form_07221460001').submit(); // clear form data $('#form_foxy_form_07221460001').html(''); // hide the modal $('#modal_07221460001').modal('hide'); clear_foxy_cart_form_07221460001(); // change add to cart button status to added add_to_cart_status('add', '07221460001'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_07221460001=localStorage.getItem("atc_international"); if(is_international_ship_set_07221460001=='1'){ // build fc form build_foxycart_form_07221460001(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_07221460001').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_07221460001').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_07221460001').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_07221460001').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0722-146-0001" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_07221460001').val('HGR To Assist'); $('#shp_name_07221460001').val('HGR To Assist'); $('#shp_price_07221460001').val('TBD'); $('#hand_fee_07221460001').val('TBD'); // submit fc form $('#foxy_cart_final_form_07221460001').submit(); // clear form data $('#form_foxy_form_07221460001').html(''); // hide the modal $('#modal_07221460001').modal('hide'); clear_foxy_cart_form_07221460001(); // change add to cart button status to added add_to_cart_status('add', '07221460001'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_07221460001(); $('#form_delivery_type_07221460001').show(); // hide pls_asw_ hide_me_07221460001('pls_asw_07221460001'); //// populate and show zip form // zip_code_empty_html_07221460001(); // $('#form_zip_07221460001').show(); // $('#continue_zip_07221460001 ').show(); // $('#continue_international_07221460001 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_07221460001(); $('#form_email_07221460001').show(); // poplate and show zip zip_code_empty_html_07221460001(); $('#form_zip_07221460001').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_07221460001(); $('#form_email_07221460001').show(); $('#continue_email_07221460001 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_07221460001(); $('#form_delivery_type_07221460001').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_07221460001(); $('#shp_type_07221460001').val('PICKUP'); $('#shp_name_07221460001').val('PICKUP') $('#shp_price_07221460001').val('$0.00'); $('#shp_zip_07221460001').val('00000'); $('#hand_fee_07221460001').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_07221460001(); $('#form_email_07221460001').show(); build_foxycart_form_07221460001(); $('#continue_rates_07221460001').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_07221460001(); $('#form_email_07221460001').show(); $('#continue_email_07221460001 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_07221460001(); $('#form_delivery_type_07221460001').show(); } }); }); function delivery_type_empty_html_07221460001(){ // change header lang $('#ModalLabel07221460001').html(''); $('#ModalLabel07221460001').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_07221460001').html(''); $('#pls_asw_07221460001').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_07221460001’).html(“); // populate form delivery_type html $(‘#form_delivery_type_07221460001’).html(`

`); } function delivery_type_set_html_07221460001(){ if(max_qty_avail_07221460001>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel07221460001’).html(”); $(‘#ModalLabel07221460001’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_07221460001’).hide(); $(‘#is_pickup_07221460001’).hide(); // align info left $(‘#form_delivery_type_07221460001’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_07221460001’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_07221460001’).hide(); // center the directions lang $(‘#form_delivery_type_07221460001’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_07221460001’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel07221460001’).html(”); $(‘#ModalLabel07221460001’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_07221460001’).hide(); $(‘#is_pickup_07221460001’).hide(); // align info left $(‘#form_delivery_type_07221460001’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_07221460001’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_07221460001’).hide(); // center the directions lang $(‘#form_delivery_type_07221460001’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_07221460001’ ,function(){ jQuery(‘#modal_07221460001’).modal(‘hide’); jQuery(‘#modal_qty_07221460001’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_07221460001" ).click(function() { // if email valid if($('#ship_email_07221460001').val() !='' && validateEmail($('#ship_email_07221460001').val())===true){ // set email/country val atc_email_val = $('#ship_email_07221460001').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_07221460001(); // hide contine email & international buttons $('#continue_email_07221460001').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_07221460001(); $('#form_zip_07221460001').show(); $('#continue_zip_07221460001').show(); $('#continue_international_07221460001 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_07221460001(); $('#continue_rates_07221460001').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_07221460001' ,function(){ //abort rates post if exists if (typeof rates_post_07221460001 !== 'undefined') { rates_post_07221460001.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_07221460001 ').hide(); $('#continue_zip_07221460001 ').hide(); $('#continue_international_07221460001 ').hide(); // empty and show email/country form email_empty_html_07221460001(); // show contine email/iternational button $('#continue_email_07221460001').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_07221460001('form_zip_'); hide_me_07221460001('form_zip_'); // empty res form //clear_me_07221460001('form_res_type_'); hide_me_07221460001('form_res_type_'); // empty loading div //clear_me_07221460001('loading_gif_'); hide_me_07221460001('loading_gif_'); // empty rates form //clear_me_07221460001('form_api_rates_'); hide_me_07221460001('form_api_rates_'); // hide rates continue button hide_me_07221460001('continue_rates'); // empty doctype form //clear_me_07221460001('form_dock_type_'); hide_me_07221460001('form_dock_type_'); // empty foxy form //clear_me_07221460001('form_foxy_form_'); //hide_me_07221460001('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_07221460001]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_07221460001').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_07221460001(); // hide contine email / international button $('#continue_email_07221460001').hide(); $('#form_email_07221460001').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_07221460001(); $('#form_zip_07221460001').show(); $('#continue_zip_07221460001').show(); $('#continue_international_07221460001 ').show(); } } }); }); function email_empty_html_07221460001(){ // clear form email html $('#form_email_07221460001').html(“); // populate form email html $('#form_email_07221460001').html(` 1. What is your email address? `); } function email_set_html_07221460001(){ // clear form email html $('#form_email_07221460001').html(“); // populate form email html $('#form_email_07221460001').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_07221460001" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_07221460001').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_07221460001').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_07221460001(); // hide contine zip & international buttons $('#continue_zip_07221460001').hide(); $('#continue_international_07221460001').hide(); // Show empty residential form res_add_empty_html_07221460001(); $('#form_res_type_07221460001').show(); }); } }); // END click contine zip // START click international $( "#continue_international_07221460001" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_07221460001(); // hide contine zip & international buttons $('#continue_zip_07221460001').hide(); $('#continue_international_07221460001').hide(); $('#chosen_rate').html(''); $('#form_api_rates_07221460001').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_07221460001(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_07221460001’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_07221460001_99’).click(); $(‘#form_api_rates_07221460001’).show(); $(‘#continue_rates_07221460001’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_07221460001’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_07221460001 !== ‘undefined’) { rates_post_07221460001.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_07221460001(); // show contine zip/iternational button $(‘#continue_zip_07221460001’).show(); $(‘#continue_international_07221460001’).show(); hide_me_07221460001(‘form_res_type_07221460001’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_07221460001]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_07221460001(); // clear dock type cookie and local storage clear_dock_type_storage_07221460001(); // empty res form clear_me_07221460001(‘form_res_type_’); hide_me_07221460001(‘form_res_type_’); // empty loading div clear_me_07221460001(‘loading_gif_’); hide_me_07221460001(‘loading_gif_’); // empty rates form clear_me_07221460001(‘form_api_rates_’); hide_me_07221460001(‘form_api_rates_’); // hide rates continue button hide_me_07221460001(‘continue_rates’); // empty doctype form clear_me_07221460001(‘form_dock_type_’); hide_me_07221460001(‘form_dock_type_’); // empty foxy form clear_me_07221460001(‘form_foxy_form_’); hide_me_07221460001(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_07221460001]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_07221460001’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_07221460001(); // hide contine zip / international button $(‘#continue_zip_07221460001’).hide(); $(‘#continue_international_07221460001’).hide(); $(‘#continue_rates_07221460001’).hide(); // poplate and show res form res_add_empty_html_07221460001(); $(‘#form_res_type_07221460001’).show(); } }); }); function zip_code_empty_html_07221460001(){ // clear form zip html $(‘#form_zip_07221460001’).html(“); // populate form zip html $(‘#form_zip_07221460001’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_07221460001(){ // clear form zip html $(‘#form_zip_07221460001’).html(“); // populate form zip html $(‘#form_zip_07221460001’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_07221460001(yes_no){ $(‘#form_res_type_07221460001’).html(“); // populate form res html $(‘#form_res_type_07221460001’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_07221460001(yes_no){ $(‘#form_dock_type_07221460001’).html(“); // populate dock form html $(‘#form_dock_type_07221460001’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_07221460001; function get_rates_07221460001(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_07221460001=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_07221460001=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0722-146-0001'; rates_atc_item_price='924.00'; rates_atc_name='Consolidated Packaging Machinery Corp/capem S-1-f Capper'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='1565'; rates_atc_length='68'; rates_atc_width='48'; rates_atc_height='80'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0722/0722146/20220727115924171_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_07221460001').html(''); $('#form_api_rates_07221460001').hide(); $('#pls_asw_07221460001').hide(); $('#loading_gif_07221460001').html(''); $('#loading_gif_07221460001').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_07221460001’).show(); //send data to api rates_post_07221460001 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0722-146-0001’, rates_atc_itemname_post: ‘Consolidated Packaging Machinery Corpcapem S 1 f Capper’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘924.00’ }, function( data ) { //// start test post url //rates_post_07221460001 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_07221460001’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_07221460001=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_07221460001.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_07221460001’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_07221460001.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_07221460001’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_07221460001’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_07221460001(); $(‘#shp_type_07221460001’).val(‘TBD’); $(‘#shp_name_07221460001’).val(‘TBD’) $(‘#shp_price_07221460001’).val(‘TBD’); $(‘#hand_fee_07221460001’).val(‘TBD’); $(‘#continue_rates_07221460001’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_07221460001’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_07221460001’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_07221460001’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_07221460001(); $(‘#shp_type_07221460001’).val(‘TBD’); $(‘#shp_name_07221460001’).val(‘TBD’) $(‘#shp_price_07221460001’).val(‘TBD’); $(‘#hand_fee_07221460001’).val(‘TBD’); //rate_item_price_07221460001=’924.00′; // $(‘#price’).val((Number(rate_item_price_07221460001) + Number(rate_info_price_07221460001)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_07221460001’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_07221460001’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_07221460001’).append(”); // clear and hide the loading gif $(‘#loading_gif_07221460001’).html(”); $(‘#loading_gif_07221460001’).hide(); // show the shipping rates div $(‘#form_api_rates_07221460001’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_07221460001.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_07221460001’).html(”); $(‘#form_api_rates_07221460001’).hide(); //$(‘#pls_asw_07221460001’).show(); $(‘#loading_gif_07221460001’).html(”); $(‘#loading_gif_07221460001’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_07221460001').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_07221460001').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_07221460001').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel07221460001').html(''); //$('#ModalLabel07221460001').html(`Delivery Type`); //// change directions lang //$('#pls_asw_07221460001').html(''); //$('#pls_asw_07221460001').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_07221460001’).show(); //// show delivery type buttons //$(‘#is_ship_07221460001’).show(); //$(‘#is_pickup_07221460001’).show(); //zip_code_empty_html_07221460001(); //res_add_empty_html_07221460001(); //dock_add_empty_html_07221460001(); //delivery_type_empty_html_07221460001(); // //$(‘#loading_gif_07221460001’).html(”); //$(‘#loading_gif_07221460001’).hide(); //$(‘#form_api_rates_07221460001’).html(”); //$(‘#form_api_rates_07221460001’).hide(); hide_me_07221460001(‘form_delivery_type_07221460001’); hide_me_07221460001(‘form_zip_07221460001’); hide_me_07221460001(‘form_res_type_07221460001’); hide_me_07221460001(‘form_dock_type_07221460001’); hide_me_07221460001(‘form_api_rates_07221460001’); hide_me_07221460001(‘form_foxy_form_07221460001’); hide_me_07221460001(‘loading_gif_07221460001’); hide_me_07221460001(‘continue_rates_07221460001’); hide_me_07221460001(‘continue_zip_07221460001’); hide_me_07221460001(‘continue_international_07221460001’); clear_me_07221460001(‘form_delivery_type_07221460001’); clear_me_07221460001(‘form_zip_07221460001’); clear_me_07221460001(‘form_res_type_07221460001’); clear_me_07221460001(‘form_dock_type_07221460001’); clear_me_07221460001(‘form_api_rates_07221460001’); clear_me_07221460001(‘form_foxy_form_07221460001’); clear_me_07221460001(‘loading_gif_07221460001’); }); }); // hide id starting with function hide_me_07221460001(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_07221460001(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_07221460001(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_07221460001(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_07221460001’).modal(‘hide’); jQuery(‘#modal_07221460001’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_07221460001(){ // clear form zip html $(‘#form_qty_07221460001’).html(“); // populate form zip html $(‘#form_qty_07221460001’).html(`

How many would you like?(`+max_qty_avail_07221460001+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0722-146-0001” }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0722-146-0001’, ‘page_type’: ‘search results page’,’price’: ‘924.00’,’category’: ‘Packaging’,’brand’: ‘Consolidated Packaging Machinery Corp/capem’, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0722-146-0001’, ‘924.00’); // END HT $(‘#favorites_heart_icon_0722-146-0001_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0722-146-0001_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0722-146-0001_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-4:hidden').length) { }else{ get_thumbs(4, 21971, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0522/0422106/20220509143520046_L.JPG', '', '0422-106-0033') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-4:hidden').length) { }else{ get_thumbs(4, 21971, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0522/0422106/20220509143520046_L.JPG', '', '0422-106-0033') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0422-106-0033
Quantity
1
Manufacturer
C-pak/creative Packaging Machinery Inc
Model Number
2212
Serial Number
989155
Make Year
Capacity
20″ X 12″ X 53″ TUNNEL
Electrical
3/220
Dimensions L x W x H (inches)
73 x 42 x 61
Weight (lb)
775
Showroom Aisle
09A
Showroom Bay
3200
Category
Packaging
Location
Euclid, OH
Item Details
20″ Belt Width

C-pak/creative Packaging Machinery Inc

C-pak/creative Packaging Machinery Inc 2212 Heat Shrink Tunnel

Euclid, OH

$231.00 $330.00 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_04221060033' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_04221060033(); build_foxycart_form_04221060033(); $('#shp_type_04221060033').val('PICKUP'); $('#shp_name_04221060033').val('PICKUP') $('#shp_price_04221060033').val('$0.00'); $('#hand_fee_04221060033').val('$0.00'); $('#shp_zip_04221060033').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_04221060033(); $('#form_email_04221060033').show(); build_foxycart_form_04221060033(); $('#continue_rates_04221060033').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_04221060033(); $('#form_email_04221060033').show(); $('#continue_email_04221060033 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_04221060033' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_04221060033(); // populate and show zip code / country form and zip code button //zip_code_empty_html_04221060033(); // $('#form_zip_04221060033').show(); // $('#continue_zip_04221060033 ').show(); // $('#continue_international_04221060033 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_04221060033(); $('#form_email_04221060033').show(); // poplate and show zip zip_code_empty_html_04221060033(); $('#form_zip_04221060033').show(); $('#continue_zip_04221060033 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_04221060033(); $('#form_email_04221060033').show(); $('#continue_email_04221060033 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_04221060033' ,function(){ //abort rates post if exists if (typeof rates_post_04221060033 !== 'undefined') { rates_post_04221060033.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_04221060033('form_email_04221060033'); hide_me_04221060033('form_zip_04221060033'); hide_me_04221060033('form_res_type_04221060033'); hide_me_04221060033('form_dock_type_04221060033'); hide_me_04221060033('form_api_rates_04221060033'); hide_me_04221060033('form_foxy_form_04221060033'); hide_me_04221060033('loading_gif_04221060033'); hide_me_04221060033('continue_rates_04221060033'); hide_me_04221060033('continue_zip_04221060033'); hide_me_04221060033('continue_email_04221060033'); hide_me_04221060033('continue_international_04221060033'); clear_me_04221060033('form_email_04221060033'); clear_me_04221060033('form_zip_04221060033'); clear_me_04221060033('form_res_type_04221060033'); clear_me_04221060033('form_dock_type_04221060033'); clear_me_04221060033('form_api_rates_04221060033'); clear_me_04221060033('form_foxy_form_04221060033'); clear_me_04221060033('loading_gif_04221060033'); // reset all forms delivery_type_empty_html_04221060033(); zip_code_empty_html_04221060033(); res_add_empty_html_04221060033(); dock_add_empty_html_04221060033(); email_empty_html_04221060033(); // align info left $('#form_delivery_type_04221060033').attr('align','center') // show directions lang $('#pls_asw_04221060033').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_04221060033').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_04221060033=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_04221060033=='1'){ // build fc form build_foxycart_form_04221060033(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_04221060033').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_04221060033').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_04221060033').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_04221060033').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0422-106-0033" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_04221060033').val('HGR To Assist'); $('#shp_price_04221060033').val('$0.00'); $('#hand_fee_04221060033').val('$0.00'); // submit fc form $('#foxy_cart_final_form_04221060033').submit(); // clear form data $('#form_foxy_form_04221060033').html(''); // hide the modal $('#modal_04221060033').modal('hide'); clear_foxy_cart_form_04221060033(); // change add to cart button status to added add_to_cart_status('add', '04221060033'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_04221060033=localStorage.getItem("atc_international"); if(is_international_ship_set_04221060033=='1'){ // build fc form build_foxycart_form_04221060033(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_04221060033').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_04221060033').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_04221060033').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_04221060033').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0422-106-0033" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_04221060033').val('HGR To Assist'); $('#shp_name_04221060033').val('HGR To Assist'); $('#shp_price_04221060033').val('TBD'); $('#hand_fee_04221060033').val('TBD'); // submit fc form $('#foxy_cart_final_form_04221060033').submit(); // clear form data $('#form_foxy_form_04221060033').html(''); // hide the modal $('#modal_04221060033').modal('hide'); clear_foxy_cart_form_04221060033(); // change add to cart button status to added add_to_cart_status('add', '04221060033'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_04221060033(); $('#form_delivery_type_04221060033').show(); // hide pls_asw_ hide_me_04221060033('pls_asw_04221060033'); //// populate and show zip form // zip_code_empty_html_04221060033(); // $('#form_zip_04221060033').show(); // $('#continue_zip_04221060033 ').show(); // $('#continue_international_04221060033 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_04221060033(); $('#form_email_04221060033').show(); // poplate and show zip zip_code_empty_html_04221060033(); $('#form_zip_04221060033').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_04221060033(); $('#form_email_04221060033').show(); $('#continue_email_04221060033 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_04221060033(); $('#form_delivery_type_04221060033').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_04221060033(); $('#shp_type_04221060033').val('PICKUP'); $('#shp_name_04221060033').val('PICKUP') $('#shp_price_04221060033').val('$0.00'); $('#shp_zip_04221060033').val('00000'); $('#hand_fee_04221060033').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_04221060033(); $('#form_email_04221060033').show(); build_foxycart_form_04221060033(); $('#continue_rates_04221060033').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_04221060033(); $('#form_email_04221060033').show(); $('#continue_email_04221060033 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_04221060033(); $('#form_delivery_type_04221060033').show(); } }); }); function delivery_type_empty_html_04221060033(){ // change header lang $('#ModalLabel04221060033').html(''); $('#ModalLabel04221060033').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_04221060033').html(''); $('#pls_asw_04221060033').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_04221060033’).html(“); // populate form delivery_type html $(‘#form_delivery_type_04221060033’).html(`

`); } function delivery_type_set_html_04221060033(){ if(max_qty_avail_04221060033>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel04221060033’).html(”); $(‘#ModalLabel04221060033’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_04221060033’).hide(); $(‘#is_pickup_04221060033’).hide(); // align info left $(‘#form_delivery_type_04221060033’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_04221060033’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_04221060033’).hide(); // center the directions lang $(‘#form_delivery_type_04221060033’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_04221060033’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel04221060033’).html(”); $(‘#ModalLabel04221060033’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_04221060033’).hide(); $(‘#is_pickup_04221060033’).hide(); // align info left $(‘#form_delivery_type_04221060033’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_04221060033’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_04221060033’).hide(); // center the directions lang $(‘#form_delivery_type_04221060033’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_04221060033’ ,function(){ jQuery(‘#modal_04221060033’).modal(‘hide’); jQuery(‘#modal_qty_04221060033’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_04221060033" ).click(function() { // if email valid if($('#ship_email_04221060033').val() !='' && validateEmail($('#ship_email_04221060033').val())===true){ // set email/country val atc_email_val = $('#ship_email_04221060033').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_04221060033(); // hide contine email & international buttons $('#continue_email_04221060033').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_04221060033(); $('#form_zip_04221060033').show(); $('#continue_zip_04221060033').show(); $('#continue_international_04221060033 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_04221060033(); $('#continue_rates_04221060033').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_04221060033' ,function(){ //abort rates post if exists if (typeof rates_post_04221060033 !== 'undefined') { rates_post_04221060033.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_04221060033 ').hide(); $('#continue_zip_04221060033 ').hide(); $('#continue_international_04221060033 ').hide(); // empty and show email/country form email_empty_html_04221060033(); // show contine email/iternational button $('#continue_email_04221060033').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_04221060033('form_zip_'); hide_me_04221060033('form_zip_'); // empty res form //clear_me_04221060033('form_res_type_'); hide_me_04221060033('form_res_type_'); // empty loading div //clear_me_04221060033('loading_gif_'); hide_me_04221060033('loading_gif_'); // empty rates form //clear_me_04221060033('form_api_rates_'); hide_me_04221060033('form_api_rates_'); // hide rates continue button hide_me_04221060033('continue_rates'); // empty doctype form //clear_me_04221060033('form_dock_type_'); hide_me_04221060033('form_dock_type_'); // empty foxy form //clear_me_04221060033('form_foxy_form_'); //hide_me_04221060033('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_04221060033]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_04221060033').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_04221060033(); // hide contine email / international button $('#continue_email_04221060033').hide(); $('#form_email_04221060033').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_04221060033(); $('#form_zip_04221060033').show(); $('#continue_zip_04221060033').show(); $('#continue_international_04221060033 ').show(); } } }); }); function email_empty_html_04221060033(){ // clear form email html $('#form_email_04221060033').html(“); // populate form email html $('#form_email_04221060033').html(` 1. What is your email address? `); } function email_set_html_04221060033(){ // clear form email html $('#form_email_04221060033').html(“); // populate form email html $('#form_email_04221060033').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_04221060033" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_04221060033').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_04221060033').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_04221060033(); // hide contine zip & international buttons $('#continue_zip_04221060033').hide(); $('#continue_international_04221060033').hide(); // Show empty residential form res_add_empty_html_04221060033(); $('#form_res_type_04221060033').show(); }); } }); // END click contine zip // START click international $( "#continue_international_04221060033" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_04221060033(); // hide contine zip & international buttons $('#continue_zip_04221060033').hide(); $('#continue_international_04221060033').hide(); $('#chosen_rate').html(''); $('#form_api_rates_04221060033').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_04221060033(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_04221060033’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_04221060033_99’).click(); $(‘#form_api_rates_04221060033’).show(); $(‘#continue_rates_04221060033’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_04221060033’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_04221060033 !== ‘undefined’) { rates_post_04221060033.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_04221060033(); // show contine zip/iternational button $(‘#continue_zip_04221060033’).show(); $(‘#continue_international_04221060033’).show(); hide_me_04221060033(‘form_res_type_04221060033’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_04221060033]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_04221060033(); // clear dock type cookie and local storage clear_dock_type_storage_04221060033(); // empty res form clear_me_04221060033(‘form_res_type_’); hide_me_04221060033(‘form_res_type_’); // empty loading div clear_me_04221060033(‘loading_gif_’); hide_me_04221060033(‘loading_gif_’); // empty rates form clear_me_04221060033(‘form_api_rates_’); hide_me_04221060033(‘form_api_rates_’); // hide rates continue button hide_me_04221060033(‘continue_rates’); // empty doctype form clear_me_04221060033(‘form_dock_type_’); hide_me_04221060033(‘form_dock_type_’); // empty foxy form clear_me_04221060033(‘form_foxy_form_’); hide_me_04221060033(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_04221060033]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_04221060033’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_04221060033(); // hide contine zip / international button $(‘#continue_zip_04221060033’).hide(); $(‘#continue_international_04221060033’).hide(); $(‘#continue_rates_04221060033’).hide(); // poplate and show res form res_add_empty_html_04221060033(); $(‘#form_res_type_04221060033’).show(); } }); }); function zip_code_empty_html_04221060033(){ // clear form zip html $(‘#form_zip_04221060033’).html(“); // populate form zip html $(‘#form_zip_04221060033’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_04221060033(){ // clear form zip html $(‘#form_zip_04221060033’).html(“); // populate form zip html $(‘#form_zip_04221060033’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_04221060033(yes_no){ $(‘#form_res_type_04221060033’).html(“); // populate form res html $(‘#form_res_type_04221060033’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_04221060033(yes_no){ $(‘#form_dock_type_04221060033’).html(“); // populate dock form html $(‘#form_dock_type_04221060033’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_04221060033; function get_rates_04221060033(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_04221060033=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_04221060033=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0422-106-0033'; rates_atc_item_price='231.00'; rates_atc_name='C-pak/creative Packaging Machinery Inc 2212 Heat Shrink Tunnel'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='775'; rates_atc_length='73'; rates_atc_width='42'; rates_atc_height='61'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0522/0422106/20220509143519907_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_04221060033').html(''); $('#form_api_rates_04221060033').hide(); $('#pls_asw_04221060033').hide(); $('#loading_gif_04221060033').html(''); $('#loading_gif_04221060033').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_04221060033’).show(); //send data to api rates_post_04221060033 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0422-106-0033’, rates_atc_itemname_post: ‘C pakcreative Packaging Machinery Inc 2212 Heat Shrink Tunnel’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘231.00’ }, function( data ) { //// start test post url //rates_post_04221060033 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_04221060033’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_04221060033=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_04221060033.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_04221060033’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_04221060033.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_04221060033’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_04221060033’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_04221060033(); $(‘#shp_type_04221060033’).val(‘TBD’); $(‘#shp_name_04221060033’).val(‘TBD’) $(‘#shp_price_04221060033’).val(‘TBD’); $(‘#hand_fee_04221060033’).val(‘TBD’); $(‘#continue_rates_04221060033’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_04221060033’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_04221060033’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_04221060033’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_04221060033(); $(‘#shp_type_04221060033’).val(‘TBD’); $(‘#shp_name_04221060033’).val(‘TBD’) $(‘#shp_price_04221060033’).val(‘TBD’); $(‘#hand_fee_04221060033’).val(‘TBD’); //rate_item_price_04221060033=’231.00′; // $(‘#price’).val((Number(rate_item_price_04221060033) + Number(rate_info_price_04221060033)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_04221060033’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_04221060033’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_04221060033’).append(”); // clear and hide the loading gif $(‘#loading_gif_04221060033’).html(”); $(‘#loading_gif_04221060033’).hide(); // show the shipping rates div $(‘#form_api_rates_04221060033’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_04221060033.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_04221060033’).html(”); $(‘#form_api_rates_04221060033’).hide(); //$(‘#pls_asw_04221060033’).show(); $(‘#loading_gif_04221060033’).html(”); $(‘#loading_gif_04221060033’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_04221060033').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_04221060033').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_04221060033').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel04221060033').html(''); //$('#ModalLabel04221060033').html(`Delivery Type`); //// change directions lang //$('#pls_asw_04221060033').html(''); //$('#pls_asw_04221060033').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_04221060033’).show(); //// show delivery type buttons //$(‘#is_ship_04221060033’).show(); //$(‘#is_pickup_04221060033’).show(); //zip_code_empty_html_04221060033(); //res_add_empty_html_04221060033(); //dock_add_empty_html_04221060033(); //delivery_type_empty_html_04221060033(); // //$(‘#loading_gif_04221060033’).html(”); //$(‘#loading_gif_04221060033’).hide(); //$(‘#form_api_rates_04221060033’).html(”); //$(‘#form_api_rates_04221060033’).hide(); hide_me_04221060033(‘form_delivery_type_04221060033’); hide_me_04221060033(‘form_zip_04221060033’); hide_me_04221060033(‘form_res_type_04221060033’); hide_me_04221060033(‘form_dock_type_04221060033’); hide_me_04221060033(‘form_api_rates_04221060033’); hide_me_04221060033(‘form_foxy_form_04221060033’); hide_me_04221060033(‘loading_gif_04221060033’); hide_me_04221060033(‘continue_rates_04221060033’); hide_me_04221060033(‘continue_zip_04221060033’); hide_me_04221060033(‘continue_international_04221060033’); clear_me_04221060033(‘form_delivery_type_04221060033’); clear_me_04221060033(‘form_zip_04221060033’); clear_me_04221060033(‘form_res_type_04221060033’); clear_me_04221060033(‘form_dock_type_04221060033’); clear_me_04221060033(‘form_api_rates_04221060033’); clear_me_04221060033(‘form_foxy_form_04221060033’); clear_me_04221060033(‘loading_gif_04221060033’); }); }); // hide id starting with function hide_me_04221060033(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_04221060033(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_04221060033(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_04221060033(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_04221060033’).modal(‘hide’); jQuery(‘#modal_04221060033’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_04221060033(){ // clear form zip html $(‘#form_qty_04221060033’).html(“); // populate form zip html $(‘#form_qty_04221060033’).html(`

How many would you like?(`+max_qty_avail_04221060033+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0422-106-0033” }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0422-106-0033’, ‘page_type’: ‘search results page’,’price’: ‘231.00’,’category’: ‘Packaging’,’brand’: ‘C-pak/creative Packaging Machinery Inc’, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0422-106-0033’, ‘231.00’); // END HT $(‘#favorites_heart_icon_0422-106-0033_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0422-106-0033_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0422-106-0033_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-5:hidden').length) { }else{ get_thumbs(5, 17677, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0922/0922224/20220930132320293_L.JPG', '', '0922-224-0034') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-5:hidden').length) { }else{ get_thumbs(5, 17677, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0922/0922224/20220930132320293_L.JPG', '', '0922-224-0034') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0922-224-0034
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
14 x 8 x 10
Weight (lb)
11
Showroom Aisle
009
Showroom Bay
0814
Category
Shop Equipment
Location
Watertown, WI
Item Details

Shop Light

Watertown, WI

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_09222240034' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_09222240034(); build_foxycart_form_09222240034(); $('#shp_type_09222240034').val('PICKUP'); $('#shp_name_09222240034').val('PICKUP') $('#shp_price_09222240034').val('$0.00'); $('#hand_fee_09222240034').val('$0.00'); $('#shp_zip_09222240034').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222240034(); $('#form_email_09222240034').show(); build_foxycart_form_09222240034(); $('#continue_rates_09222240034').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222240034(); $('#form_email_09222240034').show(); $('#continue_email_09222240034 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_09222240034' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_09222240034(); // populate and show zip code / country form and zip code button //zip_code_empty_html_09222240034(); // $('#form_zip_09222240034').show(); // $('#continue_zip_09222240034 ').show(); // $('#continue_international_09222240034 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222240034(); $('#form_email_09222240034').show(); // poplate and show zip zip_code_empty_html_09222240034(); $('#form_zip_09222240034').show(); $('#continue_zip_09222240034 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222240034(); $('#form_email_09222240034').show(); $('#continue_email_09222240034 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_09222240034' ,function(){ //abort rates post if exists if (typeof rates_post_09222240034 !== 'undefined') { rates_post_09222240034.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_09222240034('form_email_09222240034'); hide_me_09222240034('form_zip_09222240034'); hide_me_09222240034('form_res_type_09222240034'); hide_me_09222240034('form_dock_type_09222240034'); hide_me_09222240034('form_api_rates_09222240034'); hide_me_09222240034('form_foxy_form_09222240034'); hide_me_09222240034('loading_gif_09222240034'); hide_me_09222240034('continue_rates_09222240034'); hide_me_09222240034('continue_zip_09222240034'); hide_me_09222240034('continue_email_09222240034'); hide_me_09222240034('continue_international_09222240034'); clear_me_09222240034('form_email_09222240034'); clear_me_09222240034('form_zip_09222240034'); clear_me_09222240034('form_res_type_09222240034'); clear_me_09222240034('form_dock_type_09222240034'); clear_me_09222240034('form_api_rates_09222240034'); clear_me_09222240034('form_foxy_form_09222240034'); clear_me_09222240034('loading_gif_09222240034'); // reset all forms delivery_type_empty_html_09222240034(); zip_code_empty_html_09222240034(); res_add_empty_html_09222240034(); dock_add_empty_html_09222240034(); email_empty_html_09222240034(); // align info left $('#form_delivery_type_09222240034').attr('align','center') // show directions lang $('#pls_asw_09222240034').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_09222240034').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_09222240034=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09222240034=='1'){ // build fc form build_foxycart_form_09222240034(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09222240034').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09222240034').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09222240034').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09222240034').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-224-0034" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_09222240034').val('HGR To Assist'); $('#shp_price_09222240034').val('$0.00'); $('#hand_fee_09222240034').val('$0.00'); // submit fc form $('#foxy_cart_final_form_09222240034').submit(); // clear form data $('#form_foxy_form_09222240034').html(''); // hide the modal $('#modal_09222240034').modal('hide'); clear_foxy_cart_form_09222240034(); // change add to cart button status to added add_to_cart_status('add', '09222240034'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_09222240034=localStorage.getItem("atc_international"); if(is_international_ship_set_09222240034=='1'){ // build fc form build_foxycart_form_09222240034(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09222240034').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09222240034').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09222240034').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09222240034').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-224-0034" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_09222240034').val('HGR To Assist'); $('#shp_name_09222240034').val('HGR To Assist'); $('#shp_price_09222240034').val('TBD'); $('#hand_fee_09222240034').val('TBD'); // submit fc form $('#foxy_cart_final_form_09222240034').submit(); // clear form data $('#form_foxy_form_09222240034').html(''); // hide the modal $('#modal_09222240034').modal('hide'); clear_foxy_cart_form_09222240034(); // change add to cart button status to added add_to_cart_status('add', '09222240034'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_09222240034(); $('#form_delivery_type_09222240034').show(); // hide pls_asw_ hide_me_09222240034('pls_asw_09222240034'); //// populate and show zip form // zip_code_empty_html_09222240034(); // $('#form_zip_09222240034').show(); // $('#continue_zip_09222240034 ').show(); // $('#continue_international_09222240034 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222240034(); $('#form_email_09222240034').show(); // poplate and show zip zip_code_empty_html_09222240034(); $('#form_zip_09222240034').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222240034(); $('#form_email_09222240034').show(); $('#continue_email_09222240034 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_09222240034(); $('#form_delivery_type_09222240034').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_09222240034(); $('#shp_type_09222240034').val('PICKUP'); $('#shp_name_09222240034').val('PICKUP') $('#shp_price_09222240034').val('$0.00'); $('#shp_zip_09222240034').val('00000'); $('#hand_fee_09222240034').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_09222240034(); $('#form_email_09222240034').show(); build_foxycart_form_09222240034(); $('#continue_rates_09222240034').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_09222240034(); $('#form_email_09222240034').show(); $('#continue_email_09222240034 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_09222240034(); $('#form_delivery_type_09222240034').show(); } }); }); function delivery_type_empty_html_09222240034(){ // change header lang $('#ModalLabel09222240034').html(''); $('#ModalLabel09222240034').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_09222240034').html(''); $('#pls_asw_09222240034').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_09222240034’).html(“); // populate form delivery_type html $(‘#form_delivery_type_09222240034’).html(`

`); } function delivery_type_set_html_09222240034(){ if(max_qty_avail_09222240034>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel09222240034’).html(”); $(‘#ModalLabel09222240034’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_09222240034’).hide(); $(‘#is_pickup_09222240034’).hide(); // align info left $(‘#form_delivery_type_09222240034’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09222240034’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_09222240034’).hide(); // center the directions lang $(‘#form_delivery_type_09222240034’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_09222240034’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel09222240034’).html(”); $(‘#ModalLabel09222240034’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_09222240034’).hide(); $(‘#is_pickup_09222240034’).hide(); // align info left $(‘#form_delivery_type_09222240034’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09222240034’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_09222240034’).hide(); // center the directions lang $(‘#form_delivery_type_09222240034’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_09222240034’ ,function(){ jQuery(‘#modal_09222240034’).modal(‘hide’); jQuery(‘#modal_qty_09222240034’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_09222240034" ).click(function() { // if email valid if($('#ship_email_09222240034').val() !='' && validateEmail($('#ship_email_09222240034').val())===true){ // set email/country val atc_email_val = $('#ship_email_09222240034').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_09222240034(); // hide contine email & international buttons $('#continue_email_09222240034').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_09222240034(); $('#form_zip_09222240034').show(); $('#continue_zip_09222240034').show(); $('#continue_international_09222240034 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_09222240034(); $('#continue_rates_09222240034').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_09222240034' ,function(){ //abort rates post if exists if (typeof rates_post_09222240034 !== 'undefined') { rates_post_09222240034.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_09222240034 ').hide(); $('#continue_zip_09222240034 ').hide(); $('#continue_international_09222240034 ').hide(); // empty and show email/country form email_empty_html_09222240034(); // show contine email/iternational button $('#continue_email_09222240034').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_09222240034('form_zip_'); hide_me_09222240034('form_zip_'); // empty res form //clear_me_09222240034('form_res_type_'); hide_me_09222240034('form_res_type_'); // empty loading div //clear_me_09222240034('loading_gif_'); hide_me_09222240034('loading_gif_'); // empty rates form //clear_me_09222240034('form_api_rates_'); hide_me_09222240034('form_api_rates_'); // hide rates continue button hide_me_09222240034('continue_rates'); // empty doctype form //clear_me_09222240034('form_dock_type_'); hide_me_09222240034('form_dock_type_'); // empty foxy form //clear_me_09222240034('form_foxy_form_'); //hide_me_09222240034('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_09222240034]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_09222240034').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_09222240034(); // hide contine email / international button $('#continue_email_09222240034').hide(); $('#form_email_09222240034').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_09222240034(); $('#form_zip_09222240034').show(); $('#continue_zip_09222240034').show(); $('#continue_international_09222240034 ').show(); } } }); }); function email_empty_html_09222240034(){ // clear form email html $('#form_email_09222240034').html(“); // populate form email html $('#form_email_09222240034').html(` 1. What is your email address? `); } function email_set_html_09222240034(){ // clear form email html $('#form_email_09222240034').html(“); // populate form email html $('#form_email_09222240034').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_09222240034" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_09222240034').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_09222240034').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_09222240034(); // hide contine zip & international buttons $('#continue_zip_09222240034').hide(); $('#continue_international_09222240034').hide(); // Show empty residential form res_add_empty_html_09222240034(); $('#form_res_type_09222240034').show(); }); } }); // END click contine zip // START click international $( "#continue_international_09222240034" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_09222240034(); // hide contine zip & international buttons $('#continue_zip_09222240034').hide(); $('#continue_international_09222240034').hide(); $('#chosen_rate').html(''); $('#form_api_rates_09222240034').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_09222240034(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_09222240034’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_09222240034_99’).click(); $(‘#form_api_rates_09222240034’).show(); $(‘#continue_rates_09222240034’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_09222240034’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_09222240034 !== ‘undefined’) { rates_post_09222240034.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_09222240034(); // show contine zip/iternational button $(‘#continue_zip_09222240034’).show(); $(‘#continue_international_09222240034’).show(); hide_me_09222240034(‘form_res_type_09222240034’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_09222240034]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_09222240034(); // clear dock type cookie and local storage clear_dock_type_storage_09222240034(); // empty res form clear_me_09222240034(‘form_res_type_’); hide_me_09222240034(‘form_res_type_’); // empty loading div clear_me_09222240034(‘loading_gif_’); hide_me_09222240034(‘loading_gif_’); // empty rates form clear_me_09222240034(‘form_api_rates_’); hide_me_09222240034(‘form_api_rates_’); // hide rates continue button hide_me_09222240034(‘continue_rates’); // empty doctype form clear_me_09222240034(‘form_dock_type_’); hide_me_09222240034(‘form_dock_type_’); // empty foxy form clear_me_09222240034(‘form_foxy_form_’); hide_me_09222240034(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_09222240034]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_09222240034’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_09222240034(); // hide contine zip / international button $(‘#continue_zip_09222240034’).hide(); $(‘#continue_international_09222240034’).hide(); $(‘#continue_rates_09222240034’).hide(); // poplate and show res form res_add_empty_html_09222240034(); $(‘#form_res_type_09222240034’).show(); } }); }); function zip_code_empty_html_09222240034(){ // clear form zip html $(‘#form_zip_09222240034’).html(“); // populate form zip html $(‘#form_zip_09222240034’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_09222240034(){ // clear form zip html $(‘#form_zip_09222240034’).html(“); // populate form zip html $(‘#form_zip_09222240034’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_09222240034(yes_no){ $(‘#form_res_type_09222240034’).html(“); // populate form res html $(‘#form_res_type_09222240034’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_09222240034(yes_no){ $(‘#form_dock_type_09222240034’).html(“); // populate dock form html $(‘#form_dock_type_09222240034’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_09222240034; function get_rates_09222240034(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_09222240034=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09222240034=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0922-224-0034'; rates_atc_item_price='18.99'; rates_atc_name='Shop Light'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='11'; rates_atc_length='14'; rates_atc_width='8'; rates_atc_height='10'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0922/0922224/20220930132320139_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_09222240034').html(''); $('#form_api_rates_09222240034').hide(); $('#pls_asw_09222240034').hide(); $('#loading_gif_09222240034').html(''); $('#loading_gif_09222240034').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_09222240034’).show(); //send data to api rates_post_09222240034 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0922-224-0034’, rates_atc_itemname_post: ‘Shop Light’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_09222240034 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_09222240034’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_09222240034=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_09222240034.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_09222240034’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_09222240034.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_09222240034’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_09222240034’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09222240034(); $(‘#shp_type_09222240034’).val(‘TBD’); $(‘#shp_name_09222240034’).val(‘TBD’) $(‘#shp_price_09222240034’).val(‘TBD’); $(‘#hand_fee_09222240034’).val(‘TBD’); $(‘#continue_rates_09222240034’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_09222240034’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_09222240034’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_09222240034’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09222240034(); $(‘#shp_type_09222240034’).val(‘TBD’); $(‘#shp_name_09222240034’).val(‘TBD’) $(‘#shp_price_09222240034’).val(‘TBD’); $(‘#hand_fee_09222240034’).val(‘TBD’); //rate_item_price_09222240034=’18.99′; // $(‘#price’).val((Number(rate_item_price_09222240034) + Number(rate_info_price_09222240034)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_09222240034’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_09222240034’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_09222240034’).append(”); // clear and hide the loading gif $(‘#loading_gif_09222240034’).html(”); $(‘#loading_gif_09222240034’).hide(); // show the shipping rates div $(‘#form_api_rates_09222240034’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_09222240034.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_09222240034’).html(”); $(‘#form_api_rates_09222240034’).hide(); //$(‘#pls_asw_09222240034’).show(); $(‘#loading_gif_09222240034’).html(”); $(‘#loading_gif_09222240034’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_09222240034').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_09222240034').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_09222240034').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel09222240034').html(''); //$('#ModalLabel09222240034').html(`Delivery Type`); //// change directions lang //$('#pls_asw_09222240034').html(''); //$('#pls_asw_09222240034').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_09222240034’).show(); //// show delivery type buttons //$(‘#is_ship_09222240034’).show(); //$(‘#is_pickup_09222240034’).show(); //zip_code_empty_html_09222240034(); //res_add_empty_html_09222240034(); //dock_add_empty_html_09222240034(); //delivery_type_empty_html_09222240034(); // //$(‘#loading_gif_09222240034’).html(”); //$(‘#loading_gif_09222240034’).hide(); //$(‘#form_api_rates_09222240034’).html(”); //$(‘#form_api_rates_09222240034’).hide(); hide_me_09222240034(‘form_delivery_type_09222240034’); hide_me_09222240034(‘form_zip_09222240034’); hide_me_09222240034(‘form_res_type_09222240034’); hide_me_09222240034(‘form_dock_type_09222240034’); hide_me_09222240034(‘form_api_rates_09222240034’); hide_me_09222240034(‘form_foxy_form_09222240034’); hide_me_09222240034(‘loading_gif_09222240034’); hide_me_09222240034(‘continue_rates_09222240034’); hide_me_09222240034(‘continue_zip_09222240034’); hide_me_09222240034(‘continue_international_09222240034’); clear_me_09222240034(‘form_delivery_type_09222240034’); clear_me_09222240034(‘form_zip_09222240034’); clear_me_09222240034(‘form_res_type_09222240034’); clear_me_09222240034(‘form_dock_type_09222240034’); clear_me_09222240034(‘form_api_rates_09222240034’); clear_me_09222240034(‘form_foxy_form_09222240034’); clear_me_09222240034(‘loading_gif_09222240034’); }); }); // hide id starting with function hide_me_09222240034(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_09222240034(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_09222240034(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_09222240034(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_09222240034’).modal(‘hide’); jQuery(‘#modal_09222240034’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_09222240034(){ // clear form zip html $(‘#form_qty_09222240034’).html(“); // populate form zip html $(‘#form_qty_09222240034’).html(`

How many would you like?(`+max_qty_avail_09222240034+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0922-224-0034″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0922-224-0034’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0922-224-0034’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0922-224-0034_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0922-224-0034_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0922-224-0034_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-6:hidden').length) { }else{ get_thumbs(6, 18462, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0922/0922070/20220921123440705_L.JPG', '', '0922-070-0023') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-6:hidden').length) { }else{ get_thumbs(6, 18462, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0922/0922070/20220921123440705_L.JPG', '', '0922-070-0023') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0922-070-0023
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
24 x 16 x 8
Weight (lb)
3
Showroom Aisle
009
Showroom Bay
0814
Category
Shop Equipment
Location
Watertown, WI
Item Details

Shop Light

Watertown, WI

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_09220700023' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_09220700023(); build_foxycart_form_09220700023(); $('#shp_type_09220700023').val('PICKUP'); $('#shp_name_09220700023').val('PICKUP') $('#shp_price_09220700023').val('$0.00'); $('#hand_fee_09220700023').val('$0.00'); $('#shp_zip_09220700023').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09220700023(); $('#form_email_09220700023').show(); build_foxycart_form_09220700023(); $('#continue_rates_09220700023').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09220700023(); $('#form_email_09220700023').show(); $('#continue_email_09220700023 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_09220700023' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_09220700023(); // populate and show zip code / country form and zip code button //zip_code_empty_html_09220700023(); // $('#form_zip_09220700023').show(); // $('#continue_zip_09220700023 ').show(); // $('#continue_international_09220700023 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09220700023(); $('#form_email_09220700023').show(); // poplate and show zip zip_code_empty_html_09220700023(); $('#form_zip_09220700023').show(); $('#continue_zip_09220700023 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09220700023(); $('#form_email_09220700023').show(); $('#continue_email_09220700023 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_09220700023' ,function(){ //abort rates post if exists if (typeof rates_post_09220700023 !== 'undefined') { rates_post_09220700023.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_09220700023('form_email_09220700023'); hide_me_09220700023('form_zip_09220700023'); hide_me_09220700023('form_res_type_09220700023'); hide_me_09220700023('form_dock_type_09220700023'); hide_me_09220700023('form_api_rates_09220700023'); hide_me_09220700023('form_foxy_form_09220700023'); hide_me_09220700023('loading_gif_09220700023'); hide_me_09220700023('continue_rates_09220700023'); hide_me_09220700023('continue_zip_09220700023'); hide_me_09220700023('continue_email_09220700023'); hide_me_09220700023('continue_international_09220700023'); clear_me_09220700023('form_email_09220700023'); clear_me_09220700023('form_zip_09220700023'); clear_me_09220700023('form_res_type_09220700023'); clear_me_09220700023('form_dock_type_09220700023'); clear_me_09220700023('form_api_rates_09220700023'); clear_me_09220700023('form_foxy_form_09220700023'); clear_me_09220700023('loading_gif_09220700023'); // reset all forms delivery_type_empty_html_09220700023(); zip_code_empty_html_09220700023(); res_add_empty_html_09220700023(); dock_add_empty_html_09220700023(); email_empty_html_09220700023(); // align info left $('#form_delivery_type_09220700023').attr('align','center') // show directions lang $('#pls_asw_09220700023').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_09220700023').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_09220700023=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09220700023=='1'){ // build fc form build_foxycart_form_09220700023(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09220700023').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09220700023').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09220700023').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09220700023').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-070-0023" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_09220700023').val('HGR To Assist'); $('#shp_price_09220700023').val('$0.00'); $('#hand_fee_09220700023').val('$0.00'); // submit fc form $('#foxy_cart_final_form_09220700023').submit(); // clear form data $('#form_foxy_form_09220700023').html(''); // hide the modal $('#modal_09220700023').modal('hide'); clear_foxy_cart_form_09220700023(); // change add to cart button status to added add_to_cart_status('add', '09220700023'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_09220700023=localStorage.getItem("atc_international"); if(is_international_ship_set_09220700023=='1'){ // build fc form build_foxycart_form_09220700023(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09220700023').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09220700023').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09220700023').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09220700023').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-070-0023" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_09220700023').val('HGR To Assist'); $('#shp_name_09220700023').val('HGR To Assist'); $('#shp_price_09220700023').val('TBD'); $('#hand_fee_09220700023').val('TBD'); // submit fc form $('#foxy_cart_final_form_09220700023').submit(); // clear form data $('#form_foxy_form_09220700023').html(''); // hide the modal $('#modal_09220700023').modal('hide'); clear_foxy_cart_form_09220700023(); // change add to cart button status to added add_to_cart_status('add', '09220700023'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_09220700023(); $('#form_delivery_type_09220700023').show(); // hide pls_asw_ hide_me_09220700023('pls_asw_09220700023'); //// populate and show zip form // zip_code_empty_html_09220700023(); // $('#form_zip_09220700023').show(); // $('#continue_zip_09220700023 ').show(); // $('#continue_international_09220700023 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09220700023(); $('#form_email_09220700023').show(); // poplate and show zip zip_code_empty_html_09220700023(); $('#form_zip_09220700023').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09220700023(); $('#form_email_09220700023').show(); $('#continue_email_09220700023 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_09220700023(); $('#form_delivery_type_09220700023').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_09220700023(); $('#shp_type_09220700023').val('PICKUP'); $('#shp_name_09220700023').val('PICKUP') $('#shp_price_09220700023').val('$0.00'); $('#shp_zip_09220700023').val('00000'); $('#hand_fee_09220700023').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_09220700023(); $('#form_email_09220700023').show(); build_foxycart_form_09220700023(); $('#continue_rates_09220700023').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_09220700023(); $('#form_email_09220700023').show(); $('#continue_email_09220700023 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_09220700023(); $('#form_delivery_type_09220700023').show(); } }); }); function delivery_type_empty_html_09220700023(){ // change header lang $('#ModalLabel09220700023').html(''); $('#ModalLabel09220700023').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_09220700023').html(''); $('#pls_asw_09220700023').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_09220700023’).html(“); // populate form delivery_type html $(‘#form_delivery_type_09220700023’).html(`

`); } function delivery_type_set_html_09220700023(){ if(max_qty_avail_09220700023>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel09220700023’).html(”); $(‘#ModalLabel09220700023’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_09220700023’).hide(); $(‘#is_pickup_09220700023’).hide(); // align info left $(‘#form_delivery_type_09220700023’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09220700023’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_09220700023’).hide(); // center the directions lang $(‘#form_delivery_type_09220700023’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_09220700023’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel09220700023’).html(”); $(‘#ModalLabel09220700023’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_09220700023’).hide(); $(‘#is_pickup_09220700023’).hide(); // align info left $(‘#form_delivery_type_09220700023’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09220700023’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_09220700023’).hide(); // center the directions lang $(‘#form_delivery_type_09220700023’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_09220700023’ ,function(){ jQuery(‘#modal_09220700023’).modal(‘hide’); jQuery(‘#modal_qty_09220700023’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_09220700023" ).click(function() { // if email valid if($('#ship_email_09220700023').val() !='' && validateEmail($('#ship_email_09220700023').val())===true){ // set email/country val atc_email_val = $('#ship_email_09220700023').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_09220700023(); // hide contine email & international buttons $('#continue_email_09220700023').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_09220700023(); $('#form_zip_09220700023').show(); $('#continue_zip_09220700023').show(); $('#continue_international_09220700023 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_09220700023(); $('#continue_rates_09220700023').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_09220700023' ,function(){ //abort rates post if exists if (typeof rates_post_09220700023 !== 'undefined') { rates_post_09220700023.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_09220700023 ').hide(); $('#continue_zip_09220700023 ').hide(); $('#continue_international_09220700023 ').hide(); // empty and show email/country form email_empty_html_09220700023(); // show contine email/iternational button $('#continue_email_09220700023').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_09220700023('form_zip_'); hide_me_09220700023('form_zip_'); // empty res form //clear_me_09220700023('form_res_type_'); hide_me_09220700023('form_res_type_'); // empty loading div //clear_me_09220700023('loading_gif_'); hide_me_09220700023('loading_gif_'); // empty rates form //clear_me_09220700023('form_api_rates_'); hide_me_09220700023('form_api_rates_'); // hide rates continue button hide_me_09220700023('continue_rates'); // empty doctype form //clear_me_09220700023('form_dock_type_'); hide_me_09220700023('form_dock_type_'); // empty foxy form //clear_me_09220700023('form_foxy_form_'); //hide_me_09220700023('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_09220700023]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_09220700023').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_09220700023(); // hide contine email / international button $('#continue_email_09220700023').hide(); $('#form_email_09220700023').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_09220700023(); $('#form_zip_09220700023').show(); $('#continue_zip_09220700023').show(); $('#continue_international_09220700023 ').show(); } } }); }); function email_empty_html_09220700023(){ // clear form email html $('#form_email_09220700023').html(“); // populate form email html $('#form_email_09220700023').html(` 1. What is your email address? `); } function email_set_html_09220700023(){ // clear form email html $('#form_email_09220700023').html(“); // populate form email html $('#form_email_09220700023').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_09220700023" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_09220700023').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_09220700023').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_09220700023(); // hide contine zip & international buttons $('#continue_zip_09220700023').hide(); $('#continue_international_09220700023').hide(); // Show empty residential form res_add_empty_html_09220700023(); $('#form_res_type_09220700023').show(); }); } }); // END click contine zip // START click international $( "#continue_international_09220700023" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_09220700023(); // hide contine zip & international buttons $('#continue_zip_09220700023').hide(); $('#continue_international_09220700023').hide(); $('#chosen_rate').html(''); $('#form_api_rates_09220700023').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_09220700023(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_09220700023’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_09220700023_99’).click(); $(‘#form_api_rates_09220700023’).show(); $(‘#continue_rates_09220700023’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_09220700023’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_09220700023 !== ‘undefined’) { rates_post_09220700023.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_09220700023(); // show contine zip/iternational button $(‘#continue_zip_09220700023’).show(); $(‘#continue_international_09220700023’).show(); hide_me_09220700023(‘form_res_type_09220700023’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_09220700023]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_09220700023(); // clear dock type cookie and local storage clear_dock_type_storage_09220700023(); // empty res form clear_me_09220700023(‘form_res_type_’); hide_me_09220700023(‘form_res_type_’); // empty loading div clear_me_09220700023(‘loading_gif_’); hide_me_09220700023(‘loading_gif_’); // empty rates form clear_me_09220700023(‘form_api_rates_’); hide_me_09220700023(‘form_api_rates_’); // hide rates continue button hide_me_09220700023(‘continue_rates’); // empty doctype form clear_me_09220700023(‘form_dock_type_’); hide_me_09220700023(‘form_dock_type_’); // empty foxy form clear_me_09220700023(‘form_foxy_form_’); hide_me_09220700023(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_09220700023]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_09220700023’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_09220700023(); // hide contine zip / international button $(‘#continue_zip_09220700023’).hide(); $(‘#continue_international_09220700023’).hide(); $(‘#continue_rates_09220700023’).hide(); // poplate and show res form res_add_empty_html_09220700023(); $(‘#form_res_type_09220700023’).show(); } }); }); function zip_code_empty_html_09220700023(){ // clear form zip html $(‘#form_zip_09220700023’).html(“); // populate form zip html $(‘#form_zip_09220700023’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_09220700023(){ // clear form zip html $(‘#form_zip_09220700023’).html(“); // populate form zip html $(‘#form_zip_09220700023’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_09220700023(yes_no){ $(‘#form_res_type_09220700023’).html(“); // populate form res html $(‘#form_res_type_09220700023’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_09220700023(yes_no){ $(‘#form_dock_type_09220700023’).html(“); // populate dock form html $(‘#form_dock_type_09220700023’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_09220700023; function get_rates_09220700023(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_09220700023=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09220700023=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0922-070-0023'; rates_atc_item_price='18.99'; rates_atc_name='Shop Light'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='3'; rates_atc_length='24'; rates_atc_width='16'; rates_atc_height='8'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0922/0922070/20220921123440551_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_09220700023').html(''); $('#form_api_rates_09220700023').hide(); $('#pls_asw_09220700023').hide(); $('#loading_gif_09220700023').html(''); $('#loading_gif_09220700023').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_09220700023’).show(); //send data to api rates_post_09220700023 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0922-070-0023’, rates_atc_itemname_post: ‘Shop Light’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_09220700023 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_09220700023’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_09220700023=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_09220700023.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_09220700023’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_09220700023.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_09220700023’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_09220700023’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09220700023(); $(‘#shp_type_09220700023’).val(‘TBD’); $(‘#shp_name_09220700023’).val(‘TBD’) $(‘#shp_price_09220700023’).val(‘TBD’); $(‘#hand_fee_09220700023’).val(‘TBD’); $(‘#continue_rates_09220700023’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_09220700023’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_09220700023’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_09220700023’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09220700023(); $(‘#shp_type_09220700023’).val(‘TBD’); $(‘#shp_name_09220700023’).val(‘TBD’) $(‘#shp_price_09220700023’).val(‘TBD’); $(‘#hand_fee_09220700023’).val(‘TBD’); //rate_item_price_09220700023=’18.99′; // $(‘#price’).val((Number(rate_item_price_09220700023) + Number(rate_info_price_09220700023)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_09220700023’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_09220700023’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_09220700023’).append(”); // clear and hide the loading gif $(‘#loading_gif_09220700023’).html(”); $(‘#loading_gif_09220700023’).hide(); // show the shipping rates div $(‘#form_api_rates_09220700023’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_09220700023.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_09220700023’).html(”); $(‘#form_api_rates_09220700023’).hide(); //$(‘#pls_asw_09220700023’).show(); $(‘#loading_gif_09220700023’).html(”); $(‘#loading_gif_09220700023’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_09220700023').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_09220700023').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_09220700023').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel09220700023').html(''); //$('#ModalLabel09220700023').html(`Delivery Type`); //// change directions lang //$('#pls_asw_09220700023').html(''); //$('#pls_asw_09220700023').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_09220700023’).show(); //// show delivery type buttons //$(‘#is_ship_09220700023’).show(); //$(‘#is_pickup_09220700023’).show(); //zip_code_empty_html_09220700023(); //res_add_empty_html_09220700023(); //dock_add_empty_html_09220700023(); //delivery_type_empty_html_09220700023(); // //$(‘#loading_gif_09220700023’).html(”); //$(‘#loading_gif_09220700023’).hide(); //$(‘#form_api_rates_09220700023’).html(”); //$(‘#form_api_rates_09220700023’).hide(); hide_me_09220700023(‘form_delivery_type_09220700023’); hide_me_09220700023(‘form_zip_09220700023’); hide_me_09220700023(‘form_res_type_09220700023’); hide_me_09220700023(‘form_dock_type_09220700023’); hide_me_09220700023(‘form_api_rates_09220700023’); hide_me_09220700023(‘form_foxy_form_09220700023’); hide_me_09220700023(‘loading_gif_09220700023’); hide_me_09220700023(‘continue_rates_09220700023’); hide_me_09220700023(‘continue_zip_09220700023’); hide_me_09220700023(‘continue_international_09220700023’); clear_me_09220700023(‘form_delivery_type_09220700023’); clear_me_09220700023(‘form_zip_09220700023’); clear_me_09220700023(‘form_res_type_09220700023’); clear_me_09220700023(‘form_dock_type_09220700023’); clear_me_09220700023(‘form_api_rates_09220700023’); clear_me_09220700023(‘form_foxy_form_09220700023’); clear_me_09220700023(‘loading_gif_09220700023’); }); }); // hide id starting with function hide_me_09220700023(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_09220700023(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_09220700023(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_09220700023(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_09220700023’).modal(‘hide’); jQuery(‘#modal_09220700023’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_09220700023(){ // clear form zip html $(‘#form_qty_09220700023’).html(“); // populate form zip html $(‘#form_qty_09220700023’).html(`

How many would you like?(`+max_qty_avail_09220700023+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0922-070-0023″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0922-070-0023’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0922-070-0023’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0922-070-0023_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0922-070-0023_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0922-070-0023_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-7:hidden').length) { }else{ get_thumbs(7, 16932, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0922256/20221011142238697_L.JPG', '', '0922-256-0259') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-7:hidden').length) { }else{ get_thumbs(7, 16932, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0922256/20221011142238697_L.JPG', '', '0922-256-0259') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0922-256-0259
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
24 x 20 x 11
Weight (lb)
30
Showroom Aisle
02B
Showroom Bay
2811
Category
Electrical
Location
Euclid, OH
Item Details

Shop Equipment

Euclid, OH

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_09222560259' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_09222560259(); build_foxycart_form_09222560259(); $('#shp_type_09222560259').val('PICKUP'); $('#shp_name_09222560259').val('PICKUP') $('#shp_price_09222560259').val('$0.00'); $('#hand_fee_09222560259').val('$0.00'); $('#shp_zip_09222560259').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560259(); $('#form_email_09222560259').show(); build_foxycart_form_09222560259(); $('#continue_rates_09222560259').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560259(); $('#form_email_09222560259').show(); $('#continue_email_09222560259 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_09222560259' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_09222560259(); // populate and show zip code / country form and zip code button //zip_code_empty_html_09222560259(); // $('#form_zip_09222560259').show(); // $('#continue_zip_09222560259 ').show(); // $('#continue_international_09222560259 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560259(); $('#form_email_09222560259').show(); // poplate and show zip zip_code_empty_html_09222560259(); $('#form_zip_09222560259').show(); $('#continue_zip_09222560259 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560259(); $('#form_email_09222560259').show(); $('#continue_email_09222560259 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_09222560259' ,function(){ //abort rates post if exists if (typeof rates_post_09222560259 !== 'undefined') { rates_post_09222560259.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_09222560259('form_email_09222560259'); hide_me_09222560259('form_zip_09222560259'); hide_me_09222560259('form_res_type_09222560259'); hide_me_09222560259('form_dock_type_09222560259'); hide_me_09222560259('form_api_rates_09222560259'); hide_me_09222560259('form_foxy_form_09222560259'); hide_me_09222560259('loading_gif_09222560259'); hide_me_09222560259('continue_rates_09222560259'); hide_me_09222560259('continue_zip_09222560259'); hide_me_09222560259('continue_email_09222560259'); hide_me_09222560259('continue_international_09222560259'); clear_me_09222560259('form_email_09222560259'); clear_me_09222560259('form_zip_09222560259'); clear_me_09222560259('form_res_type_09222560259'); clear_me_09222560259('form_dock_type_09222560259'); clear_me_09222560259('form_api_rates_09222560259'); clear_me_09222560259('form_foxy_form_09222560259'); clear_me_09222560259('loading_gif_09222560259'); // reset all forms delivery_type_empty_html_09222560259(); zip_code_empty_html_09222560259(); res_add_empty_html_09222560259(); dock_add_empty_html_09222560259(); email_empty_html_09222560259(); // align info left $('#form_delivery_type_09222560259').attr('align','center') // show directions lang $('#pls_asw_09222560259').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_09222560259').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_09222560259=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09222560259=='1'){ // build fc form build_foxycart_form_09222560259(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09222560259').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09222560259').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09222560259').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09222560259').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-256-0259" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_09222560259').val('HGR To Assist'); $('#shp_price_09222560259').val('$0.00'); $('#hand_fee_09222560259').val('$0.00'); // submit fc form $('#foxy_cart_final_form_09222560259').submit(); // clear form data $('#form_foxy_form_09222560259').html(''); // hide the modal $('#modal_09222560259').modal('hide'); clear_foxy_cart_form_09222560259(); // change add to cart button status to added add_to_cart_status('add', '09222560259'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_09222560259=localStorage.getItem("atc_international"); if(is_international_ship_set_09222560259=='1'){ // build fc form build_foxycart_form_09222560259(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09222560259').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09222560259').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09222560259').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09222560259').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-256-0259" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_09222560259').val('HGR To Assist'); $('#shp_name_09222560259').val('HGR To Assist'); $('#shp_price_09222560259').val('TBD'); $('#hand_fee_09222560259').val('TBD'); // submit fc form $('#foxy_cart_final_form_09222560259').submit(); // clear form data $('#form_foxy_form_09222560259').html(''); // hide the modal $('#modal_09222560259').modal('hide'); clear_foxy_cart_form_09222560259(); // change add to cart button status to added add_to_cart_status('add', '09222560259'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_09222560259(); $('#form_delivery_type_09222560259').show(); // hide pls_asw_ hide_me_09222560259('pls_asw_09222560259'); //// populate and show zip form // zip_code_empty_html_09222560259(); // $('#form_zip_09222560259').show(); // $('#continue_zip_09222560259 ').show(); // $('#continue_international_09222560259 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560259(); $('#form_email_09222560259').show(); // poplate and show zip zip_code_empty_html_09222560259(); $('#form_zip_09222560259').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560259(); $('#form_email_09222560259').show(); $('#continue_email_09222560259 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_09222560259(); $('#form_delivery_type_09222560259').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_09222560259(); $('#shp_type_09222560259').val('PICKUP'); $('#shp_name_09222560259').val('PICKUP') $('#shp_price_09222560259').val('$0.00'); $('#shp_zip_09222560259').val('00000'); $('#hand_fee_09222560259').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_09222560259(); $('#form_email_09222560259').show(); build_foxycart_form_09222560259(); $('#continue_rates_09222560259').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_09222560259(); $('#form_email_09222560259').show(); $('#continue_email_09222560259 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_09222560259(); $('#form_delivery_type_09222560259').show(); } }); }); function delivery_type_empty_html_09222560259(){ // change header lang $('#ModalLabel09222560259').html(''); $('#ModalLabel09222560259').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_09222560259').html(''); $('#pls_asw_09222560259').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_09222560259’).html(“); // populate form delivery_type html $(‘#form_delivery_type_09222560259’).html(`

`); } function delivery_type_set_html_09222560259(){ if(max_qty_avail_09222560259>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel09222560259’).html(”); $(‘#ModalLabel09222560259’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_09222560259’).hide(); $(‘#is_pickup_09222560259’).hide(); // align info left $(‘#form_delivery_type_09222560259’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09222560259’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_09222560259’).hide(); // center the directions lang $(‘#form_delivery_type_09222560259’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_09222560259’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel09222560259’).html(”); $(‘#ModalLabel09222560259’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_09222560259’).hide(); $(‘#is_pickup_09222560259’).hide(); // align info left $(‘#form_delivery_type_09222560259’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09222560259’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_09222560259’).hide(); // center the directions lang $(‘#form_delivery_type_09222560259’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_09222560259’ ,function(){ jQuery(‘#modal_09222560259’).modal(‘hide’); jQuery(‘#modal_qty_09222560259’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_09222560259" ).click(function() { // if email valid if($('#ship_email_09222560259').val() !='' && validateEmail($('#ship_email_09222560259').val())===true){ // set email/country val atc_email_val = $('#ship_email_09222560259').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_09222560259(); // hide contine email & international buttons $('#continue_email_09222560259').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_09222560259(); $('#form_zip_09222560259').show(); $('#continue_zip_09222560259').show(); $('#continue_international_09222560259 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_09222560259(); $('#continue_rates_09222560259').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_09222560259' ,function(){ //abort rates post if exists if (typeof rates_post_09222560259 !== 'undefined') { rates_post_09222560259.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_09222560259 ').hide(); $('#continue_zip_09222560259 ').hide(); $('#continue_international_09222560259 ').hide(); // empty and show email/country form email_empty_html_09222560259(); // show contine email/iternational button $('#continue_email_09222560259').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_09222560259('form_zip_'); hide_me_09222560259('form_zip_'); // empty res form //clear_me_09222560259('form_res_type_'); hide_me_09222560259('form_res_type_'); // empty loading div //clear_me_09222560259('loading_gif_'); hide_me_09222560259('loading_gif_'); // empty rates form //clear_me_09222560259('form_api_rates_'); hide_me_09222560259('form_api_rates_'); // hide rates continue button hide_me_09222560259('continue_rates'); // empty doctype form //clear_me_09222560259('form_dock_type_'); hide_me_09222560259('form_dock_type_'); // empty foxy form //clear_me_09222560259('form_foxy_form_'); //hide_me_09222560259('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_09222560259]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_09222560259').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_09222560259(); // hide contine email / international button $('#continue_email_09222560259').hide(); $('#form_email_09222560259').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_09222560259(); $('#form_zip_09222560259').show(); $('#continue_zip_09222560259').show(); $('#continue_international_09222560259 ').show(); } } }); }); function email_empty_html_09222560259(){ // clear form email html $('#form_email_09222560259').html(“); // populate form email html $('#form_email_09222560259').html(` 1. What is your email address? `); } function email_set_html_09222560259(){ // clear form email html $('#form_email_09222560259').html(“); // populate form email html $('#form_email_09222560259').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_09222560259" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_09222560259').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_09222560259').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_09222560259(); // hide contine zip & international buttons $('#continue_zip_09222560259').hide(); $('#continue_international_09222560259').hide(); // Show empty residential form res_add_empty_html_09222560259(); $('#form_res_type_09222560259').show(); }); } }); // END click contine zip // START click international $( "#continue_international_09222560259" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_09222560259(); // hide contine zip & international buttons $('#continue_zip_09222560259').hide(); $('#continue_international_09222560259').hide(); $('#chosen_rate').html(''); $('#form_api_rates_09222560259').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_09222560259(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_09222560259’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_09222560259_99’).click(); $(‘#form_api_rates_09222560259’).show(); $(‘#continue_rates_09222560259’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_09222560259’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_09222560259 !== ‘undefined’) { rates_post_09222560259.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_09222560259(); // show contine zip/iternational button $(‘#continue_zip_09222560259’).show(); $(‘#continue_international_09222560259’).show(); hide_me_09222560259(‘form_res_type_09222560259’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_09222560259]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_09222560259(); // clear dock type cookie and local storage clear_dock_type_storage_09222560259(); // empty res form clear_me_09222560259(‘form_res_type_’); hide_me_09222560259(‘form_res_type_’); // empty loading div clear_me_09222560259(‘loading_gif_’); hide_me_09222560259(‘loading_gif_’); // empty rates form clear_me_09222560259(‘form_api_rates_’); hide_me_09222560259(‘form_api_rates_’); // hide rates continue button hide_me_09222560259(‘continue_rates’); // empty doctype form clear_me_09222560259(‘form_dock_type_’); hide_me_09222560259(‘form_dock_type_’); // empty foxy form clear_me_09222560259(‘form_foxy_form_’); hide_me_09222560259(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_09222560259]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_09222560259’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_09222560259(); // hide contine zip / international button $(‘#continue_zip_09222560259’).hide(); $(‘#continue_international_09222560259’).hide(); $(‘#continue_rates_09222560259’).hide(); // poplate and show res form res_add_empty_html_09222560259(); $(‘#form_res_type_09222560259’).show(); } }); }); function zip_code_empty_html_09222560259(){ // clear form zip html $(‘#form_zip_09222560259’).html(“); // populate form zip html $(‘#form_zip_09222560259’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_09222560259(){ // clear form zip html $(‘#form_zip_09222560259’).html(“); // populate form zip html $(‘#form_zip_09222560259’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_09222560259(yes_no){ $(‘#form_res_type_09222560259’).html(“); // populate form res html $(‘#form_res_type_09222560259’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_09222560259(yes_no){ $(‘#form_dock_type_09222560259’).html(“); // populate dock form html $(‘#form_dock_type_09222560259’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_09222560259; function get_rates_09222560259(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_09222560259=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09222560259=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0922-256-0259'; rates_atc_item_price='18.99'; rates_atc_name='Shop Equipment'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='30'; rates_atc_length='24'; rates_atc_width='20'; rates_atc_height='11'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/1022/0922256/20221011142238543_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_09222560259').html(''); $('#form_api_rates_09222560259').hide(); $('#pls_asw_09222560259').hide(); $('#loading_gif_09222560259').html(''); $('#loading_gif_09222560259').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_09222560259’).show(); //send data to api rates_post_09222560259 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0922-256-0259’, rates_atc_itemname_post: ‘Shop Equipment’, rates_atc_item_sale_type_post: ’02’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_09222560259 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_09222560259’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_09222560259=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_09222560259.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_09222560259’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_09222560259.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_09222560259’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_09222560259’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09222560259(); $(‘#shp_type_09222560259’).val(‘TBD’); $(‘#shp_name_09222560259’).val(‘TBD’) $(‘#shp_price_09222560259’).val(‘TBD’); $(‘#hand_fee_09222560259’).val(‘TBD’); $(‘#continue_rates_09222560259’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_09222560259’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_09222560259’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_09222560259’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09222560259(); $(‘#shp_type_09222560259’).val(‘TBD’); $(‘#shp_name_09222560259’).val(‘TBD’) $(‘#shp_price_09222560259’).val(‘TBD’); $(‘#hand_fee_09222560259’).val(‘TBD’); //rate_item_price_09222560259=’18.99′; // $(‘#price’).val((Number(rate_item_price_09222560259) + Number(rate_info_price_09222560259)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_09222560259’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_09222560259’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_09222560259’).append(”); // clear and hide the loading gif $(‘#loading_gif_09222560259’).html(”); $(‘#loading_gif_09222560259’).hide(); // show the shipping rates div $(‘#form_api_rates_09222560259’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_09222560259.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_09222560259’).html(”); $(‘#form_api_rates_09222560259’).hide(); //$(‘#pls_asw_09222560259’).show(); $(‘#loading_gif_09222560259’).html(”); $(‘#loading_gif_09222560259’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_09222560259').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_09222560259').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_09222560259').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel09222560259').html(''); //$('#ModalLabel09222560259').html(`Delivery Type`); //// change directions lang //$('#pls_asw_09222560259').html(''); //$('#pls_asw_09222560259').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_09222560259’).show(); //// show delivery type buttons //$(‘#is_ship_09222560259’).show(); //$(‘#is_pickup_09222560259’).show(); //zip_code_empty_html_09222560259(); //res_add_empty_html_09222560259(); //dock_add_empty_html_09222560259(); //delivery_type_empty_html_09222560259(); // //$(‘#loading_gif_09222560259’).html(”); //$(‘#loading_gif_09222560259’).hide(); //$(‘#form_api_rates_09222560259’).html(”); //$(‘#form_api_rates_09222560259’).hide(); hide_me_09222560259(‘form_delivery_type_09222560259’); hide_me_09222560259(‘form_zip_09222560259’); hide_me_09222560259(‘form_res_type_09222560259’); hide_me_09222560259(‘form_dock_type_09222560259’); hide_me_09222560259(‘form_api_rates_09222560259’); hide_me_09222560259(‘form_foxy_form_09222560259’); hide_me_09222560259(‘loading_gif_09222560259’); hide_me_09222560259(‘continue_rates_09222560259’); hide_me_09222560259(‘continue_zip_09222560259’); hide_me_09222560259(‘continue_international_09222560259’); clear_me_09222560259(‘form_delivery_type_09222560259’); clear_me_09222560259(‘form_zip_09222560259’); clear_me_09222560259(‘form_res_type_09222560259’); clear_me_09222560259(‘form_dock_type_09222560259’); clear_me_09222560259(‘form_api_rates_09222560259’); clear_me_09222560259(‘form_foxy_form_09222560259’); clear_me_09222560259(‘loading_gif_09222560259’); }); }); // hide id starting with function hide_me_09222560259(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_09222560259(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_09222560259(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_09222560259(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_09222560259’).modal(‘hide’); jQuery(‘#modal_09222560259’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_09222560259(){ // clear form zip html $(‘#form_qty_09222560259’).html(“); // populate form zip html $(‘#form_qty_09222560259’).html(`

How many would you like?(`+max_qty_avail_09222560259+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0922-256-0259″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0922-256-0259’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Electrical’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0922-256-0259’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0922-256-0259_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0922-256-0259_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0922-256-0259_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-8:hidden').length) { }else{ get_thumbs(8, 19750, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0822/0822048/20220830172057636_L.JPG', '', '0822-048-1158') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-8:hidden').length) { }else{ get_thumbs(8, 19750, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0822/0822048/20220830172057636_L.JPG', '', '0822-048-1158') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0822-048-1158
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
18 x 12 x 8
Weight (lb)
23
Showroom Aisle
004
Showroom Bay
0821
Category
Shop Equipment
Location
Watertown, WI
Item Details

Shop Supplies

Watertown, WI

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_08220481158' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_08220481158(); build_foxycart_form_08220481158(); $('#shp_type_08220481158').val('PICKUP'); $('#shp_name_08220481158').val('PICKUP') $('#shp_price_08220481158').val('$0.00'); $('#hand_fee_08220481158').val('$0.00'); $('#shp_zip_08220481158').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481158(); $('#form_email_08220481158').show(); build_foxycart_form_08220481158(); $('#continue_rates_08220481158').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481158(); $('#form_email_08220481158').show(); $('#continue_email_08220481158 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_08220481158' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_08220481158(); // populate and show zip code / country form and zip code button //zip_code_empty_html_08220481158(); // $('#form_zip_08220481158').show(); // $('#continue_zip_08220481158 ').show(); // $('#continue_international_08220481158 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481158(); $('#form_email_08220481158').show(); // poplate and show zip zip_code_empty_html_08220481158(); $('#form_zip_08220481158').show(); $('#continue_zip_08220481158 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481158(); $('#form_email_08220481158').show(); $('#continue_email_08220481158 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_08220481158' ,function(){ //abort rates post if exists if (typeof rates_post_08220481158 !== 'undefined') { rates_post_08220481158.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_08220481158('form_email_08220481158'); hide_me_08220481158('form_zip_08220481158'); hide_me_08220481158('form_res_type_08220481158'); hide_me_08220481158('form_dock_type_08220481158'); hide_me_08220481158('form_api_rates_08220481158'); hide_me_08220481158('form_foxy_form_08220481158'); hide_me_08220481158('loading_gif_08220481158'); hide_me_08220481158('continue_rates_08220481158'); hide_me_08220481158('continue_zip_08220481158'); hide_me_08220481158('continue_email_08220481158'); hide_me_08220481158('continue_international_08220481158'); clear_me_08220481158('form_email_08220481158'); clear_me_08220481158('form_zip_08220481158'); clear_me_08220481158('form_res_type_08220481158'); clear_me_08220481158('form_dock_type_08220481158'); clear_me_08220481158('form_api_rates_08220481158'); clear_me_08220481158('form_foxy_form_08220481158'); clear_me_08220481158('loading_gif_08220481158'); // reset all forms delivery_type_empty_html_08220481158(); zip_code_empty_html_08220481158(); res_add_empty_html_08220481158(); dock_add_empty_html_08220481158(); email_empty_html_08220481158(); // align info left $('#form_delivery_type_08220481158').attr('align','center') // show directions lang $('#pls_asw_08220481158').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_08220481158').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_08220481158=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220481158=='1'){ // build fc form build_foxycart_form_08220481158(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220481158').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220481158').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220481158').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220481158').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-1158" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_08220481158').val('HGR To Assist'); $('#shp_price_08220481158').val('$0.00'); $('#hand_fee_08220481158').val('$0.00'); // submit fc form $('#foxy_cart_final_form_08220481158').submit(); // clear form data $('#form_foxy_form_08220481158').html(''); // hide the modal $('#modal_08220481158').modal('hide'); clear_foxy_cart_form_08220481158(); // change add to cart button status to added add_to_cart_status('add', '08220481158'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_08220481158=localStorage.getItem("atc_international"); if(is_international_ship_set_08220481158=='1'){ // build fc form build_foxycart_form_08220481158(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220481158').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220481158').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220481158').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220481158').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-1158" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_08220481158').val('HGR To Assist'); $('#shp_name_08220481158').val('HGR To Assist'); $('#shp_price_08220481158').val('TBD'); $('#hand_fee_08220481158').val('TBD'); // submit fc form $('#foxy_cart_final_form_08220481158').submit(); // clear form data $('#form_foxy_form_08220481158').html(''); // hide the modal $('#modal_08220481158').modal('hide'); clear_foxy_cart_form_08220481158(); // change add to cart button status to added add_to_cart_status('add', '08220481158'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_08220481158(); $('#form_delivery_type_08220481158').show(); // hide pls_asw_ hide_me_08220481158('pls_asw_08220481158'); //// populate and show zip form // zip_code_empty_html_08220481158(); // $('#form_zip_08220481158').show(); // $('#continue_zip_08220481158 ').show(); // $('#continue_international_08220481158 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481158(); $('#form_email_08220481158').show(); // poplate and show zip zip_code_empty_html_08220481158(); $('#form_zip_08220481158').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481158(); $('#form_email_08220481158').show(); $('#continue_email_08220481158 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_08220481158(); $('#form_delivery_type_08220481158').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_08220481158(); $('#shp_type_08220481158').val('PICKUP'); $('#shp_name_08220481158').val('PICKUP') $('#shp_price_08220481158').val('$0.00'); $('#shp_zip_08220481158').val('00000'); $('#hand_fee_08220481158').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_08220481158(); $('#form_email_08220481158').show(); build_foxycart_form_08220481158(); $('#continue_rates_08220481158').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_08220481158(); $('#form_email_08220481158').show(); $('#continue_email_08220481158 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_08220481158(); $('#form_delivery_type_08220481158').show(); } }); }); function delivery_type_empty_html_08220481158(){ // change header lang $('#ModalLabel08220481158').html(''); $('#ModalLabel08220481158').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_08220481158').html(''); $('#pls_asw_08220481158').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_08220481158’).html(“); // populate form delivery_type html $(‘#form_delivery_type_08220481158’).html(`

`); } function delivery_type_set_html_08220481158(){ if(max_qty_avail_08220481158>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel08220481158’).html(”); $(‘#ModalLabel08220481158’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_08220481158’).hide(); $(‘#is_pickup_08220481158’).hide(); // align info left $(‘#form_delivery_type_08220481158’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220481158’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_08220481158’).hide(); // center the directions lang $(‘#form_delivery_type_08220481158’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_08220481158’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel08220481158’).html(”); $(‘#ModalLabel08220481158’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_08220481158’).hide(); $(‘#is_pickup_08220481158’).hide(); // align info left $(‘#form_delivery_type_08220481158’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220481158’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_08220481158’).hide(); // center the directions lang $(‘#form_delivery_type_08220481158’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_08220481158’ ,function(){ jQuery(‘#modal_08220481158’).modal(‘hide’); jQuery(‘#modal_qty_08220481158’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_08220481158" ).click(function() { // if email valid if($('#ship_email_08220481158').val() !='' && validateEmail($('#ship_email_08220481158').val())===true){ // set email/country val atc_email_val = $('#ship_email_08220481158').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_08220481158(); // hide contine email & international buttons $('#continue_email_08220481158').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_08220481158(); $('#form_zip_08220481158').show(); $('#continue_zip_08220481158').show(); $('#continue_international_08220481158 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_08220481158(); $('#continue_rates_08220481158').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_08220481158' ,function(){ //abort rates post if exists if (typeof rates_post_08220481158 !== 'undefined') { rates_post_08220481158.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_08220481158 ').hide(); $('#continue_zip_08220481158 ').hide(); $('#continue_international_08220481158 ').hide(); // empty and show email/country form email_empty_html_08220481158(); // show contine email/iternational button $('#continue_email_08220481158').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_08220481158('form_zip_'); hide_me_08220481158('form_zip_'); // empty res form //clear_me_08220481158('form_res_type_'); hide_me_08220481158('form_res_type_'); // empty loading div //clear_me_08220481158('loading_gif_'); hide_me_08220481158('loading_gif_'); // empty rates form //clear_me_08220481158('form_api_rates_'); hide_me_08220481158('form_api_rates_'); // hide rates continue button hide_me_08220481158('continue_rates'); // empty doctype form //clear_me_08220481158('form_dock_type_'); hide_me_08220481158('form_dock_type_'); // empty foxy form //clear_me_08220481158('form_foxy_form_'); //hide_me_08220481158('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_08220481158]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_08220481158').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_08220481158(); // hide contine email / international button $('#continue_email_08220481158').hide(); $('#form_email_08220481158').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_08220481158(); $('#form_zip_08220481158').show(); $('#continue_zip_08220481158').show(); $('#continue_international_08220481158 ').show(); } } }); }); function email_empty_html_08220481158(){ // clear form email html $('#form_email_08220481158').html(“); // populate form email html $('#form_email_08220481158').html(` 1. What is your email address? `); } function email_set_html_08220481158(){ // clear form email html $('#form_email_08220481158').html(“); // populate form email html $('#form_email_08220481158').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_08220481158" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_08220481158').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_08220481158').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_08220481158(); // hide contine zip & international buttons $('#continue_zip_08220481158').hide(); $('#continue_international_08220481158').hide(); // Show empty residential form res_add_empty_html_08220481158(); $('#form_res_type_08220481158').show(); }); } }); // END click contine zip // START click international $( "#continue_international_08220481158" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_08220481158(); // hide contine zip & international buttons $('#continue_zip_08220481158').hide(); $('#continue_international_08220481158').hide(); $('#chosen_rate').html(''); $('#form_api_rates_08220481158').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_08220481158(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_08220481158’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_08220481158_99’).click(); $(‘#form_api_rates_08220481158’).show(); $(‘#continue_rates_08220481158’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_08220481158’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_08220481158 !== ‘undefined’) { rates_post_08220481158.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_08220481158(); // show contine zip/iternational button $(‘#continue_zip_08220481158’).show(); $(‘#continue_international_08220481158’).show(); hide_me_08220481158(‘form_res_type_08220481158’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_08220481158]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_08220481158(); // clear dock type cookie and local storage clear_dock_type_storage_08220481158(); // empty res form clear_me_08220481158(‘form_res_type_’); hide_me_08220481158(‘form_res_type_’); // empty loading div clear_me_08220481158(‘loading_gif_’); hide_me_08220481158(‘loading_gif_’); // empty rates form clear_me_08220481158(‘form_api_rates_’); hide_me_08220481158(‘form_api_rates_’); // hide rates continue button hide_me_08220481158(‘continue_rates’); // empty doctype form clear_me_08220481158(‘form_dock_type_’); hide_me_08220481158(‘form_dock_type_’); // empty foxy form clear_me_08220481158(‘form_foxy_form_’); hide_me_08220481158(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_08220481158]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_08220481158’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_08220481158(); // hide contine zip / international button $(‘#continue_zip_08220481158’).hide(); $(‘#continue_international_08220481158’).hide(); $(‘#continue_rates_08220481158’).hide(); // poplate and show res form res_add_empty_html_08220481158(); $(‘#form_res_type_08220481158’).show(); } }); }); function zip_code_empty_html_08220481158(){ // clear form zip html $(‘#form_zip_08220481158’).html(“); // populate form zip html $(‘#form_zip_08220481158’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_08220481158(){ // clear form zip html $(‘#form_zip_08220481158’).html(“); // populate form zip html $(‘#form_zip_08220481158’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_08220481158(yes_no){ $(‘#form_res_type_08220481158’).html(“); // populate form res html $(‘#form_res_type_08220481158’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_08220481158(yes_no){ $(‘#form_dock_type_08220481158’).html(“); // populate dock form html $(‘#form_dock_type_08220481158’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_08220481158; function get_rates_08220481158(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_08220481158=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220481158=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0822-048-1158'; rates_atc_item_price='18.99'; rates_atc_name='Shop Supplies'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='23'; rates_atc_length='18'; rates_atc_width='12'; rates_atc_height='8'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0822/0822048/20220830172057493_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_08220481158').html(''); $('#form_api_rates_08220481158').hide(); $('#pls_asw_08220481158').hide(); $('#loading_gif_08220481158').html(''); $('#loading_gif_08220481158').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_08220481158’).show(); //send data to api rates_post_08220481158 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0822-048-1158’, rates_atc_itemname_post: ‘Shop Supplies’, rates_atc_item_sale_type_post: ’02’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_08220481158 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_08220481158’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_08220481158=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_08220481158.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_08220481158’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_08220481158.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_08220481158’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_08220481158’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220481158(); $(‘#shp_type_08220481158’).val(‘TBD’); $(‘#shp_name_08220481158’).val(‘TBD’) $(‘#shp_price_08220481158’).val(‘TBD’); $(‘#hand_fee_08220481158’).val(‘TBD’); $(‘#continue_rates_08220481158’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_08220481158’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_08220481158’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_08220481158’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220481158(); $(‘#shp_type_08220481158’).val(‘TBD’); $(‘#shp_name_08220481158’).val(‘TBD’) $(‘#shp_price_08220481158’).val(‘TBD’); $(‘#hand_fee_08220481158’).val(‘TBD’); //rate_item_price_08220481158=’18.99′; // $(‘#price’).val((Number(rate_item_price_08220481158) + Number(rate_info_price_08220481158)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_08220481158’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_08220481158’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_08220481158’).append(”); // clear and hide the loading gif $(‘#loading_gif_08220481158’).html(”); $(‘#loading_gif_08220481158’).hide(); // show the shipping rates div $(‘#form_api_rates_08220481158’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_08220481158.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_08220481158’).html(”); $(‘#form_api_rates_08220481158’).hide(); //$(‘#pls_asw_08220481158’).show(); $(‘#loading_gif_08220481158’).html(”); $(‘#loading_gif_08220481158’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_08220481158').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_08220481158').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_08220481158').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel08220481158').html(''); //$('#ModalLabel08220481158').html(`Delivery Type`); //// change directions lang //$('#pls_asw_08220481158').html(''); //$('#pls_asw_08220481158').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_08220481158’).show(); //// show delivery type buttons //$(‘#is_ship_08220481158’).show(); //$(‘#is_pickup_08220481158’).show(); //zip_code_empty_html_08220481158(); //res_add_empty_html_08220481158(); //dock_add_empty_html_08220481158(); //delivery_type_empty_html_08220481158(); // //$(‘#loading_gif_08220481158’).html(”); //$(‘#loading_gif_08220481158’).hide(); //$(‘#form_api_rates_08220481158’).html(”); //$(‘#form_api_rates_08220481158’).hide(); hide_me_08220481158(‘form_delivery_type_08220481158’); hide_me_08220481158(‘form_zip_08220481158’); hide_me_08220481158(‘form_res_type_08220481158’); hide_me_08220481158(‘form_dock_type_08220481158’); hide_me_08220481158(‘form_api_rates_08220481158’); hide_me_08220481158(‘form_foxy_form_08220481158’); hide_me_08220481158(‘loading_gif_08220481158’); hide_me_08220481158(‘continue_rates_08220481158’); hide_me_08220481158(‘continue_zip_08220481158’); hide_me_08220481158(‘continue_international_08220481158’); clear_me_08220481158(‘form_delivery_type_08220481158’); clear_me_08220481158(‘form_zip_08220481158’); clear_me_08220481158(‘form_res_type_08220481158’); clear_me_08220481158(‘form_dock_type_08220481158’); clear_me_08220481158(‘form_api_rates_08220481158’); clear_me_08220481158(‘form_foxy_form_08220481158’); clear_me_08220481158(‘loading_gif_08220481158’); }); }); // hide id starting with function hide_me_08220481158(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_08220481158(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_08220481158(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_08220481158(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_08220481158’).modal(‘hide’); jQuery(‘#modal_08220481158’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_08220481158(){ // clear form zip html $(‘#form_qty_08220481158’).html(“); // populate form zip html $(‘#form_qty_08220481158’).html(`

How many would you like?(`+max_qty_avail_08220481158+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0822-048-1158″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0822-048-1158’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0822-048-1158’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0822-048-1158_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0822-048-1158_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0822-048-1158_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-9:hidden').length) { }else{ get_thumbs(9, 20013, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0822/0822048/20220824145429379_L.JPG', '', '0822-048-0911') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-9:hidden').length) { }else{ get_thumbs(9, 20013, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0822/0822048/20220824145429379_L.JPG', '', '0822-048-0911') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0822-048-0911
Quantity
1
Manufacturer Model Number
5AY56
Serial Number Make Year
Capacity
100 W
Electrical
1/60/120
Dimensions L x W x H (inches)
16 x 10 x 7
Weight (lb)
4
Showroom Aisle
006
Showroom Bay
0724
Category
Shop Equipment
Location
Watertown, WI
Item Details

Shop Light

Watertown, WI

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_08220480911' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_08220480911(); build_foxycart_form_08220480911(); $('#shp_type_08220480911').val('PICKUP'); $('#shp_name_08220480911').val('PICKUP') $('#shp_price_08220480911').val('$0.00'); $('#hand_fee_08220480911').val('$0.00'); $('#shp_zip_08220480911').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480911(); $('#form_email_08220480911').show(); build_foxycart_form_08220480911(); $('#continue_rates_08220480911').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480911(); $('#form_email_08220480911').show(); $('#continue_email_08220480911 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_08220480911' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_08220480911(); // populate and show zip code / country form and zip code button //zip_code_empty_html_08220480911(); // $('#form_zip_08220480911').show(); // $('#continue_zip_08220480911 ').show(); // $('#continue_international_08220480911 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480911(); $('#form_email_08220480911').show(); // poplate and show zip zip_code_empty_html_08220480911(); $('#form_zip_08220480911').show(); $('#continue_zip_08220480911 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480911(); $('#form_email_08220480911').show(); $('#continue_email_08220480911 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_08220480911' ,function(){ //abort rates post if exists if (typeof rates_post_08220480911 !== 'undefined') { rates_post_08220480911.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_08220480911('form_email_08220480911'); hide_me_08220480911('form_zip_08220480911'); hide_me_08220480911('form_res_type_08220480911'); hide_me_08220480911('form_dock_type_08220480911'); hide_me_08220480911('form_api_rates_08220480911'); hide_me_08220480911('form_foxy_form_08220480911'); hide_me_08220480911('loading_gif_08220480911'); hide_me_08220480911('continue_rates_08220480911'); hide_me_08220480911('continue_zip_08220480911'); hide_me_08220480911('continue_email_08220480911'); hide_me_08220480911('continue_international_08220480911'); clear_me_08220480911('form_email_08220480911'); clear_me_08220480911('form_zip_08220480911'); clear_me_08220480911('form_res_type_08220480911'); clear_me_08220480911('form_dock_type_08220480911'); clear_me_08220480911('form_api_rates_08220480911'); clear_me_08220480911('form_foxy_form_08220480911'); clear_me_08220480911('loading_gif_08220480911'); // reset all forms delivery_type_empty_html_08220480911(); zip_code_empty_html_08220480911(); res_add_empty_html_08220480911(); dock_add_empty_html_08220480911(); email_empty_html_08220480911(); // align info left $('#form_delivery_type_08220480911').attr('align','center') // show directions lang $('#pls_asw_08220480911').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_08220480911').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_08220480911=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220480911=='1'){ // build fc form build_foxycart_form_08220480911(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220480911').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220480911').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220480911').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220480911').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-0911" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_08220480911').val('HGR To Assist'); $('#shp_price_08220480911').val('$0.00'); $('#hand_fee_08220480911').val('$0.00'); // submit fc form $('#foxy_cart_final_form_08220480911').submit(); // clear form data $('#form_foxy_form_08220480911').html(''); // hide the modal $('#modal_08220480911').modal('hide'); clear_foxy_cart_form_08220480911(); // change add to cart button status to added add_to_cart_status('add', '08220480911'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_08220480911=localStorage.getItem("atc_international"); if(is_international_ship_set_08220480911=='1'){ // build fc form build_foxycart_form_08220480911(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220480911').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220480911').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220480911').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220480911').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-0911" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_08220480911').val('HGR To Assist'); $('#shp_name_08220480911').val('HGR To Assist'); $('#shp_price_08220480911').val('TBD'); $('#hand_fee_08220480911').val('TBD'); // submit fc form $('#foxy_cart_final_form_08220480911').submit(); // clear form data $('#form_foxy_form_08220480911').html(''); // hide the modal $('#modal_08220480911').modal('hide'); clear_foxy_cart_form_08220480911(); // change add to cart button status to added add_to_cart_status('add', '08220480911'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_08220480911(); $('#form_delivery_type_08220480911').show(); // hide pls_asw_ hide_me_08220480911('pls_asw_08220480911'); //// populate and show zip form // zip_code_empty_html_08220480911(); // $('#form_zip_08220480911').show(); // $('#continue_zip_08220480911 ').show(); // $('#continue_international_08220480911 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480911(); $('#form_email_08220480911').show(); // poplate and show zip zip_code_empty_html_08220480911(); $('#form_zip_08220480911').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480911(); $('#form_email_08220480911').show(); $('#continue_email_08220480911 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_08220480911(); $('#form_delivery_type_08220480911').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_08220480911(); $('#shp_type_08220480911').val('PICKUP'); $('#shp_name_08220480911').val('PICKUP') $('#shp_price_08220480911').val('$0.00'); $('#shp_zip_08220480911').val('00000'); $('#hand_fee_08220480911').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_08220480911(); $('#form_email_08220480911').show(); build_foxycart_form_08220480911(); $('#continue_rates_08220480911').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_08220480911(); $('#form_email_08220480911').show(); $('#continue_email_08220480911 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_08220480911(); $('#form_delivery_type_08220480911').show(); } }); }); function delivery_type_empty_html_08220480911(){ // change header lang $('#ModalLabel08220480911').html(''); $('#ModalLabel08220480911').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_08220480911').html(''); $('#pls_asw_08220480911').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_08220480911’).html(“); // populate form delivery_type html $(‘#form_delivery_type_08220480911’).html(`

`); } function delivery_type_set_html_08220480911(){ if(max_qty_avail_08220480911>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel08220480911’).html(”); $(‘#ModalLabel08220480911’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_08220480911’).hide(); $(‘#is_pickup_08220480911’).hide(); // align info left $(‘#form_delivery_type_08220480911’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220480911’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_08220480911’).hide(); // center the directions lang $(‘#form_delivery_type_08220480911’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_08220480911’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel08220480911’).html(”); $(‘#ModalLabel08220480911’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_08220480911’).hide(); $(‘#is_pickup_08220480911’).hide(); // align info left $(‘#form_delivery_type_08220480911’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220480911’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_08220480911’).hide(); // center the directions lang $(‘#form_delivery_type_08220480911’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_08220480911’ ,function(){ jQuery(‘#modal_08220480911’).modal(‘hide’); jQuery(‘#modal_qty_08220480911’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_08220480911" ).click(function() { // if email valid if($('#ship_email_08220480911').val() !='' && validateEmail($('#ship_email_08220480911').val())===true){ // set email/country val atc_email_val = $('#ship_email_08220480911').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_08220480911(); // hide contine email & international buttons $('#continue_email_08220480911').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_08220480911(); $('#form_zip_08220480911').show(); $('#continue_zip_08220480911').show(); $('#continue_international_08220480911 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_08220480911(); $('#continue_rates_08220480911').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_08220480911' ,function(){ //abort rates post if exists if (typeof rates_post_08220480911 !== 'undefined') { rates_post_08220480911.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_08220480911 ').hide(); $('#continue_zip_08220480911 ').hide(); $('#continue_international_08220480911 ').hide(); // empty and show email/country form email_empty_html_08220480911(); // show contine email/iternational button $('#continue_email_08220480911').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_08220480911('form_zip_'); hide_me_08220480911('form_zip_'); // empty res form //clear_me_08220480911('form_res_type_'); hide_me_08220480911('form_res_type_'); // empty loading div //clear_me_08220480911('loading_gif_'); hide_me_08220480911('loading_gif_'); // empty rates form //clear_me_08220480911('form_api_rates_'); hide_me_08220480911('form_api_rates_'); // hide rates continue button hide_me_08220480911('continue_rates'); // empty doctype form //clear_me_08220480911('form_dock_type_'); hide_me_08220480911('form_dock_type_'); // empty foxy form //clear_me_08220480911('form_foxy_form_'); //hide_me_08220480911('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_08220480911]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_08220480911').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_08220480911(); // hide contine email / international button $('#continue_email_08220480911').hide(); $('#form_email_08220480911').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_08220480911(); $('#form_zip_08220480911').show(); $('#continue_zip_08220480911').show(); $('#continue_international_08220480911 ').show(); } } }); }); function email_empty_html_08220480911(){ // clear form email html $('#form_email_08220480911').html(“); // populate form email html $('#form_email_08220480911').html(` 1. What is your email address? `); } function email_set_html_08220480911(){ // clear form email html $('#form_email_08220480911').html(“); // populate form email html $('#form_email_08220480911').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_08220480911" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_08220480911').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_08220480911').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_08220480911(); // hide contine zip & international buttons $('#continue_zip_08220480911').hide(); $('#continue_international_08220480911').hide(); // Show empty residential form res_add_empty_html_08220480911(); $('#form_res_type_08220480911').show(); }); } }); // END click contine zip // START click international $( "#continue_international_08220480911" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_08220480911(); // hide contine zip & international buttons $('#continue_zip_08220480911').hide(); $('#continue_international_08220480911').hide(); $('#chosen_rate').html(''); $('#form_api_rates_08220480911').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_08220480911(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_08220480911’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_08220480911_99’).click(); $(‘#form_api_rates_08220480911’).show(); $(‘#continue_rates_08220480911’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_08220480911’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_08220480911 !== ‘undefined’) { rates_post_08220480911.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_08220480911(); // show contine zip/iternational button $(‘#continue_zip_08220480911’).show(); $(‘#continue_international_08220480911’).show(); hide_me_08220480911(‘form_res_type_08220480911’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_08220480911]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_08220480911(); // clear dock type cookie and local storage clear_dock_type_storage_08220480911(); // empty res form clear_me_08220480911(‘form_res_type_’); hide_me_08220480911(‘form_res_type_’); // empty loading div clear_me_08220480911(‘loading_gif_’); hide_me_08220480911(‘loading_gif_’); // empty rates form clear_me_08220480911(‘form_api_rates_’); hide_me_08220480911(‘form_api_rates_’); // hide rates continue button hide_me_08220480911(‘continue_rates’); // empty doctype form clear_me_08220480911(‘form_dock_type_’); hide_me_08220480911(‘form_dock_type_’); // empty foxy form clear_me_08220480911(‘form_foxy_form_’); hide_me_08220480911(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_08220480911]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_08220480911’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_08220480911(); // hide contine zip / international button $(‘#continue_zip_08220480911’).hide(); $(‘#continue_international_08220480911’).hide(); $(‘#continue_rates_08220480911’).hide(); // poplate and show res form res_add_empty_html_08220480911(); $(‘#form_res_type_08220480911’).show(); } }); }); function zip_code_empty_html_08220480911(){ // clear form zip html $(‘#form_zip_08220480911’).html(“); // populate form zip html $(‘#form_zip_08220480911’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_08220480911(){ // clear form zip html $(‘#form_zip_08220480911’).html(“); // populate form zip html $(‘#form_zip_08220480911’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_08220480911(yes_no){ $(‘#form_res_type_08220480911’).html(“); // populate form res html $(‘#form_res_type_08220480911’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_08220480911(yes_no){ $(‘#form_dock_type_08220480911’).html(“); // populate dock form html $(‘#form_dock_type_08220480911’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_08220480911; function get_rates_08220480911(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_08220480911=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220480911=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0822-048-0911'; rates_atc_item_price='18.99'; rates_atc_name='Shop Light'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='4'; rates_atc_length='16'; rates_atc_width='10'; rates_atc_height='7'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0822/0822048/20220824145429207_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_08220480911').html(''); $('#form_api_rates_08220480911').hide(); $('#pls_asw_08220480911').hide(); $('#loading_gif_08220480911').html(''); $('#loading_gif_08220480911').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_08220480911’).show(); //send data to api rates_post_08220480911 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0822-048-0911’, rates_atc_itemname_post: ‘Shop Light’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_08220480911 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_08220480911’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_08220480911=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_08220480911.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_08220480911’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_08220480911.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_08220480911’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_08220480911’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220480911(); $(‘#shp_type_08220480911’).val(‘TBD’); $(‘#shp_name_08220480911’).val(‘TBD’) $(‘#shp_price_08220480911’).val(‘TBD’); $(‘#hand_fee_08220480911’).val(‘TBD’); $(‘#continue_rates_08220480911’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_08220480911’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_08220480911’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_08220480911’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220480911(); $(‘#shp_type_08220480911’).val(‘TBD’); $(‘#shp_name_08220480911’).val(‘TBD’) $(‘#shp_price_08220480911’).val(‘TBD’); $(‘#hand_fee_08220480911’).val(‘TBD’); //rate_item_price_08220480911=’18.99′; // $(‘#price’).val((Number(rate_item_price_08220480911) + Number(rate_info_price_08220480911)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_08220480911’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_08220480911’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_08220480911’).append(”); // clear and hide the loading gif $(‘#loading_gif_08220480911’).html(”); $(‘#loading_gif_08220480911’).hide(); // show the shipping rates div $(‘#form_api_rates_08220480911’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_08220480911.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_08220480911’).html(”); $(‘#form_api_rates_08220480911’).hide(); //$(‘#pls_asw_08220480911’).show(); $(‘#loading_gif_08220480911’).html(”); $(‘#loading_gif_08220480911’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_08220480911').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_08220480911').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_08220480911').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel08220480911').html(''); //$('#ModalLabel08220480911').html(`Delivery Type`); //// change directions lang //$('#pls_asw_08220480911').html(''); //$('#pls_asw_08220480911').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_08220480911’).show(); //// show delivery type buttons //$(‘#is_ship_08220480911’).show(); //$(‘#is_pickup_08220480911’).show(); //zip_code_empty_html_08220480911(); //res_add_empty_html_08220480911(); //dock_add_empty_html_08220480911(); //delivery_type_empty_html_08220480911(); // //$(‘#loading_gif_08220480911’).html(”); //$(‘#loading_gif_08220480911’).hide(); //$(‘#form_api_rates_08220480911’).html(”); //$(‘#form_api_rates_08220480911’).hide(); hide_me_08220480911(‘form_delivery_type_08220480911’); hide_me_08220480911(‘form_zip_08220480911’); hide_me_08220480911(‘form_res_type_08220480911’); hide_me_08220480911(‘form_dock_type_08220480911’); hide_me_08220480911(‘form_api_rates_08220480911’); hide_me_08220480911(‘form_foxy_form_08220480911’); hide_me_08220480911(‘loading_gif_08220480911’); hide_me_08220480911(‘continue_rates_08220480911’); hide_me_08220480911(‘continue_zip_08220480911’); hide_me_08220480911(‘continue_international_08220480911’); clear_me_08220480911(‘form_delivery_type_08220480911’); clear_me_08220480911(‘form_zip_08220480911’); clear_me_08220480911(‘form_res_type_08220480911’); clear_me_08220480911(‘form_dock_type_08220480911’); clear_me_08220480911(‘form_api_rates_08220480911’); clear_me_08220480911(‘form_foxy_form_08220480911’); clear_me_08220480911(‘loading_gif_08220480911’); }); }); // hide id starting with function hide_me_08220480911(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_08220480911(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_08220480911(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_08220480911(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_08220480911’).modal(‘hide’); jQuery(‘#modal_08220480911’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_08220480911(){ // clear form zip html $(‘#form_qty_08220480911’).html(“); // populate form zip html $(‘#form_qty_08220480911’).html(`

How many would you like?(`+max_qty_avail_08220480911+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0822-048-0911″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0822-048-0911’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0822-048-0911’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0822-048-0911_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0822-048-0911_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0822-048-0911_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-10:hidden').length) { }else{ get_thumbs(10, 19810, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0822-048-1089') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-10:hidden').length) { }else{ get_thumbs(10, 19810, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0822-048-1089') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0822-048-1089
Quantity
1
Manufacturer
Regent
Model Number
Serial Number Make Year
Capacity
500 WATTS
Electrical
1/60/120
Dimensions L x W x H (inches)
8 x 10 x 10
Weight (lb)
2
Showroom Aisle
006
Showroom Bay
0744
Category
Shop Equipment
Location
Watertown, WI
Item Details
Made In China

Regent

Shop Light

Watertown, WI

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_08220481089' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_08220481089(); build_foxycart_form_08220481089(); $('#shp_type_08220481089').val('PICKUP'); $('#shp_name_08220481089').val('PICKUP') $('#shp_price_08220481089').val('$0.00'); $('#hand_fee_08220481089').val('$0.00'); $('#shp_zip_08220481089').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481089(); $('#form_email_08220481089').show(); build_foxycart_form_08220481089(); $('#continue_rates_08220481089').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481089(); $('#form_email_08220481089').show(); $('#continue_email_08220481089 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_08220481089' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_08220481089(); // populate and show zip code / country form and zip code button //zip_code_empty_html_08220481089(); // $('#form_zip_08220481089').show(); // $('#continue_zip_08220481089 ').show(); // $('#continue_international_08220481089 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481089(); $('#form_email_08220481089').show(); // poplate and show zip zip_code_empty_html_08220481089(); $('#form_zip_08220481089').show(); $('#continue_zip_08220481089 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481089(); $('#form_email_08220481089').show(); $('#continue_email_08220481089 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_08220481089' ,function(){ //abort rates post if exists if (typeof rates_post_08220481089 !== 'undefined') { rates_post_08220481089.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_08220481089('form_email_08220481089'); hide_me_08220481089('form_zip_08220481089'); hide_me_08220481089('form_res_type_08220481089'); hide_me_08220481089('form_dock_type_08220481089'); hide_me_08220481089('form_api_rates_08220481089'); hide_me_08220481089('form_foxy_form_08220481089'); hide_me_08220481089('loading_gif_08220481089'); hide_me_08220481089('continue_rates_08220481089'); hide_me_08220481089('continue_zip_08220481089'); hide_me_08220481089('continue_email_08220481089'); hide_me_08220481089('continue_international_08220481089'); clear_me_08220481089('form_email_08220481089'); clear_me_08220481089('form_zip_08220481089'); clear_me_08220481089('form_res_type_08220481089'); clear_me_08220481089('form_dock_type_08220481089'); clear_me_08220481089('form_api_rates_08220481089'); clear_me_08220481089('form_foxy_form_08220481089'); clear_me_08220481089('loading_gif_08220481089'); // reset all forms delivery_type_empty_html_08220481089(); zip_code_empty_html_08220481089(); res_add_empty_html_08220481089(); dock_add_empty_html_08220481089(); email_empty_html_08220481089(); // align info left $('#form_delivery_type_08220481089').attr('align','center') // show directions lang $('#pls_asw_08220481089').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_08220481089').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_08220481089=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220481089=='1'){ // build fc form build_foxycart_form_08220481089(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220481089').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220481089').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220481089').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220481089').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-1089" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_08220481089').val('HGR To Assist'); $('#shp_price_08220481089').val('$0.00'); $('#hand_fee_08220481089').val('$0.00'); // submit fc form $('#foxy_cart_final_form_08220481089').submit(); // clear form data $('#form_foxy_form_08220481089').html(''); // hide the modal $('#modal_08220481089').modal('hide'); clear_foxy_cart_form_08220481089(); // change add to cart button status to added add_to_cart_status('add', '08220481089'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_08220481089=localStorage.getItem("atc_international"); if(is_international_ship_set_08220481089=='1'){ // build fc form build_foxycart_form_08220481089(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220481089').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220481089').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220481089').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220481089').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-1089" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_08220481089').val('HGR To Assist'); $('#shp_name_08220481089').val('HGR To Assist'); $('#shp_price_08220481089').val('TBD'); $('#hand_fee_08220481089').val('TBD'); // submit fc form $('#foxy_cart_final_form_08220481089').submit(); // clear form data $('#form_foxy_form_08220481089').html(''); // hide the modal $('#modal_08220481089').modal('hide'); clear_foxy_cart_form_08220481089(); // change add to cart button status to added add_to_cart_status('add', '08220481089'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_08220481089(); $('#form_delivery_type_08220481089').show(); // hide pls_asw_ hide_me_08220481089('pls_asw_08220481089'); //// populate and show zip form // zip_code_empty_html_08220481089(); // $('#form_zip_08220481089').show(); // $('#continue_zip_08220481089 ').show(); // $('#continue_international_08220481089 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481089(); $('#form_email_08220481089').show(); // poplate and show zip zip_code_empty_html_08220481089(); $('#form_zip_08220481089').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481089(); $('#form_email_08220481089').show(); $('#continue_email_08220481089 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_08220481089(); $('#form_delivery_type_08220481089').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_08220481089(); $('#shp_type_08220481089').val('PICKUP'); $('#shp_name_08220481089').val('PICKUP') $('#shp_price_08220481089').val('$0.00'); $('#shp_zip_08220481089').val('00000'); $('#hand_fee_08220481089').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_08220481089(); $('#form_email_08220481089').show(); build_foxycart_form_08220481089(); $('#continue_rates_08220481089').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_08220481089(); $('#form_email_08220481089').show(); $('#continue_email_08220481089 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_08220481089(); $('#form_delivery_type_08220481089').show(); } }); }); function delivery_type_empty_html_08220481089(){ // change header lang $('#ModalLabel08220481089').html(''); $('#ModalLabel08220481089').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_08220481089').html(''); $('#pls_asw_08220481089').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_08220481089’).html(“); // populate form delivery_type html $(‘#form_delivery_type_08220481089’).html(`

`); } function delivery_type_set_html_08220481089(){ if(max_qty_avail_08220481089>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel08220481089’).html(”); $(‘#ModalLabel08220481089’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_08220481089’).hide(); $(‘#is_pickup_08220481089’).hide(); // align info left $(‘#form_delivery_type_08220481089’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220481089’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_08220481089’).hide(); // center the directions lang $(‘#form_delivery_type_08220481089’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_08220481089’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel08220481089’).html(”); $(‘#ModalLabel08220481089’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_08220481089’).hide(); $(‘#is_pickup_08220481089’).hide(); // align info left $(‘#form_delivery_type_08220481089’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220481089’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_08220481089’).hide(); // center the directions lang $(‘#form_delivery_type_08220481089’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_08220481089’ ,function(){ jQuery(‘#modal_08220481089’).modal(‘hide’); jQuery(‘#modal_qty_08220481089’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_08220481089" ).click(function() { // if email valid if($('#ship_email_08220481089').val() !='' && validateEmail($('#ship_email_08220481089').val())===true){ // set email/country val atc_email_val = $('#ship_email_08220481089').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_08220481089(); // hide contine email & international buttons $('#continue_email_08220481089').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_08220481089(); $('#form_zip_08220481089').show(); $('#continue_zip_08220481089').show(); $('#continue_international_08220481089 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_08220481089(); $('#continue_rates_08220481089').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_08220481089' ,function(){ //abort rates post if exists if (typeof rates_post_08220481089 !== 'undefined') { rates_post_08220481089.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_08220481089 ').hide(); $('#continue_zip_08220481089 ').hide(); $('#continue_international_08220481089 ').hide(); // empty and show email/country form email_empty_html_08220481089(); // show contine email/iternational button $('#continue_email_08220481089').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_08220481089('form_zip_'); hide_me_08220481089('form_zip_'); // empty res form //clear_me_08220481089('form_res_type_'); hide_me_08220481089('form_res_type_'); // empty loading div //clear_me_08220481089('loading_gif_'); hide_me_08220481089('loading_gif_'); // empty rates form //clear_me_08220481089('form_api_rates_'); hide_me_08220481089('form_api_rates_'); // hide rates continue button hide_me_08220481089('continue_rates'); // empty doctype form //clear_me_08220481089('form_dock_type_'); hide_me_08220481089('form_dock_type_'); // empty foxy form //clear_me_08220481089('form_foxy_form_'); //hide_me_08220481089('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_08220481089]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_08220481089').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_08220481089(); // hide contine email / international button $('#continue_email_08220481089').hide(); $('#form_email_08220481089').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_08220481089(); $('#form_zip_08220481089').show(); $('#continue_zip_08220481089').show(); $('#continue_international_08220481089 ').show(); } } }); }); function email_empty_html_08220481089(){ // clear form email html $('#form_email_08220481089').html(“); // populate form email html $('#form_email_08220481089').html(` 1. What is your email address? `); } function email_set_html_08220481089(){ // clear form email html $('#form_email_08220481089').html(“); // populate form email html $('#form_email_08220481089').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_08220481089" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_08220481089').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_08220481089').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_08220481089(); // hide contine zip & international buttons $('#continue_zip_08220481089').hide(); $('#continue_international_08220481089').hide(); // Show empty residential form res_add_empty_html_08220481089(); $('#form_res_type_08220481089').show(); }); } }); // END click contine zip // START click international $( "#continue_international_08220481089" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_08220481089(); // hide contine zip & international buttons $('#continue_zip_08220481089').hide(); $('#continue_international_08220481089').hide(); $('#chosen_rate').html(''); $('#form_api_rates_08220481089').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_08220481089(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_08220481089’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_08220481089_99’).click(); $(‘#form_api_rates_08220481089’).show(); $(‘#continue_rates_08220481089’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_08220481089’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_08220481089 !== ‘undefined’) { rates_post_08220481089.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_08220481089(); // show contine zip/iternational button $(‘#continue_zip_08220481089’).show(); $(‘#continue_international_08220481089’).show(); hide_me_08220481089(‘form_res_type_08220481089’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_08220481089]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_08220481089(); // clear dock type cookie and local storage clear_dock_type_storage_08220481089(); // empty res form clear_me_08220481089(‘form_res_type_’); hide_me_08220481089(‘form_res_type_’); // empty loading div clear_me_08220481089(‘loading_gif_’); hide_me_08220481089(‘loading_gif_’); // empty rates form clear_me_08220481089(‘form_api_rates_’); hide_me_08220481089(‘form_api_rates_’); // hide rates continue button hide_me_08220481089(‘continue_rates’); // empty doctype form clear_me_08220481089(‘form_dock_type_’); hide_me_08220481089(‘form_dock_type_’); // empty foxy form clear_me_08220481089(‘form_foxy_form_’); hide_me_08220481089(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_08220481089]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_08220481089’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_08220481089(); // hide contine zip / international button $(‘#continue_zip_08220481089’).hide(); $(‘#continue_international_08220481089’).hide(); $(‘#continue_rates_08220481089’).hide(); // poplate and show res form res_add_empty_html_08220481089(); $(‘#form_res_type_08220481089’).show(); } }); }); function zip_code_empty_html_08220481089(){ // clear form zip html $(‘#form_zip_08220481089’).html(“); // populate form zip html $(‘#form_zip_08220481089’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_08220481089(){ // clear form zip html $(‘#form_zip_08220481089’).html(“); // populate form zip html $(‘#form_zip_08220481089’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_08220481089(yes_no){ $(‘#form_res_type_08220481089’).html(“); // populate form res html $(‘#form_res_type_08220481089’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_08220481089(yes_no){ $(‘#form_dock_type_08220481089’).html(“); // populate dock form html $(‘#form_dock_type_08220481089’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_08220481089; function get_rates_08220481089(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_08220481089=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220481089=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0822-048-1089'; rates_atc_item_price='18.99'; rates_atc_name='Shop Light'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='2'; rates_atc_length='8'; rates_atc_width='10'; rates_atc_height='10'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0822/0822048/20220830143741016_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_08220481089').html(''); $('#form_api_rates_08220481089').hide(); $('#pls_asw_08220481089').hide(); $('#loading_gif_08220481089').html(''); $('#loading_gif_08220481089').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_08220481089’).show(); //send data to api rates_post_08220481089 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0822-048-1089’, rates_atc_itemname_post: ‘Shop Light’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_08220481089 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_08220481089’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_08220481089=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_08220481089.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_08220481089’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_08220481089.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_08220481089’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_08220481089’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220481089(); $(‘#shp_type_08220481089’).val(‘TBD’); $(‘#shp_name_08220481089’).val(‘TBD’) $(‘#shp_price_08220481089’).val(‘TBD’); $(‘#hand_fee_08220481089’).val(‘TBD’); $(‘#continue_rates_08220481089’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_08220481089’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_08220481089’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_08220481089’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220481089(); $(‘#shp_type_08220481089’).val(‘TBD’); $(‘#shp_name_08220481089’).val(‘TBD’) $(‘#shp_price_08220481089’).val(‘TBD’); $(‘#hand_fee_08220481089’).val(‘TBD’); //rate_item_price_08220481089=’18.99′; // $(‘#price’).val((Number(rate_item_price_08220481089) + Number(rate_info_price_08220481089)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_08220481089’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_08220481089’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_08220481089’).append(”); // clear and hide the loading gif $(‘#loading_gif_08220481089’).html(”); $(‘#loading_gif_08220481089’).hide(); // show the shipping rates div $(‘#form_api_rates_08220481089’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_08220481089.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_08220481089’).html(”); $(‘#form_api_rates_08220481089’).hide(); //$(‘#pls_asw_08220481089’).show(); $(‘#loading_gif_08220481089’).html(”); $(‘#loading_gif_08220481089’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_08220481089').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_08220481089').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_08220481089').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel08220481089').html(''); //$('#ModalLabel08220481089').html(`Delivery Type`); //// change directions lang //$('#pls_asw_08220481089').html(''); //$('#pls_asw_08220481089').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_08220481089’).show(); //// show delivery type buttons //$(‘#is_ship_08220481089’).show(); //$(‘#is_pickup_08220481089’).show(); //zip_code_empty_html_08220481089(); //res_add_empty_html_08220481089(); //dock_add_empty_html_08220481089(); //delivery_type_empty_html_08220481089(); // //$(‘#loading_gif_08220481089’).html(”); //$(‘#loading_gif_08220481089’).hide(); //$(‘#form_api_rates_08220481089’).html(”); //$(‘#form_api_rates_08220481089’).hide(); hide_me_08220481089(‘form_delivery_type_08220481089’); hide_me_08220481089(‘form_zip_08220481089’); hide_me_08220481089(‘form_res_type_08220481089’); hide_me_08220481089(‘form_dock_type_08220481089’); hide_me_08220481089(‘form_api_rates_08220481089’); hide_me_08220481089(‘form_foxy_form_08220481089’); hide_me_08220481089(‘loading_gif_08220481089’); hide_me_08220481089(‘continue_rates_08220481089’); hide_me_08220481089(‘continue_zip_08220481089’); hide_me_08220481089(‘continue_international_08220481089’); clear_me_08220481089(‘form_delivery_type_08220481089’); clear_me_08220481089(‘form_zip_08220481089’); clear_me_08220481089(‘form_res_type_08220481089’); clear_me_08220481089(‘form_dock_type_08220481089’); clear_me_08220481089(‘form_api_rates_08220481089’); clear_me_08220481089(‘form_foxy_form_08220481089’); clear_me_08220481089(‘loading_gif_08220481089’); }); }); // hide id starting with function hide_me_08220481089(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_08220481089(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_08220481089(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_08220481089(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_08220481089’).modal(‘hide’); jQuery(‘#modal_08220481089’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_08220481089(){ // clear form zip html $(‘#form_qty_08220481089’).html(“); // populate form zip html $(‘#form_qty_08220481089’).html(`

How many would you like?(`+max_qty_avail_08220481089+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0822-048-1089” }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0822-048-1089’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ‘Regent’, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0822-048-1089’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0822-048-1089_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0822-048-1089_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0822-048-1089_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-11:hidden').length) { }else{ get_thumbs(11, 17015, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0822-048-1645') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-11:hidden').length) { }else{ get_thumbs(11, 17015, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0822-048-1645') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0822-048-1645
Quantity
1
Manufacturer
Right Stuff Industrial
Model Number
QPL 650
Serial Number Make Year
Capacity Electrical
1/60/120V
Dimensions L x W x H (inches)
19 x 17 x 54
Weight (lb)
40
Showroom Aisle
017
Showroom Bay
0300
Category
Shop Equipment
Location
Watertown, WI
Item Details

Right Stuff Industrial

Shop Vac

Watertown, WI

$18.99 $20.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_08220481645' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_08220481645(); build_foxycart_form_08220481645(); $('#shp_type_08220481645').val('PICKUP'); $('#shp_name_08220481645').val('PICKUP') $('#shp_price_08220481645').val('$0.00'); $('#hand_fee_08220481645').val('$0.00'); $('#shp_zip_08220481645').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481645(); $('#form_email_08220481645').show(); build_foxycart_form_08220481645(); $('#continue_rates_08220481645').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481645(); $('#form_email_08220481645').show(); $('#continue_email_08220481645 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_08220481645' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_08220481645(); // populate and show zip code / country form and zip code button //zip_code_empty_html_08220481645(); // $('#form_zip_08220481645').show(); // $('#continue_zip_08220481645 ').show(); // $('#continue_international_08220481645 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481645(); $('#form_email_08220481645').show(); // poplate and show zip zip_code_empty_html_08220481645(); $('#form_zip_08220481645').show(); $('#continue_zip_08220481645 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481645(); $('#form_email_08220481645').show(); $('#continue_email_08220481645 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_08220481645' ,function(){ //abort rates post if exists if (typeof rates_post_08220481645 !== 'undefined') { rates_post_08220481645.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_08220481645('form_email_08220481645'); hide_me_08220481645('form_zip_08220481645'); hide_me_08220481645('form_res_type_08220481645'); hide_me_08220481645('form_dock_type_08220481645'); hide_me_08220481645('form_api_rates_08220481645'); hide_me_08220481645('form_foxy_form_08220481645'); hide_me_08220481645('loading_gif_08220481645'); hide_me_08220481645('continue_rates_08220481645'); hide_me_08220481645('continue_zip_08220481645'); hide_me_08220481645('continue_email_08220481645'); hide_me_08220481645('continue_international_08220481645'); clear_me_08220481645('form_email_08220481645'); clear_me_08220481645('form_zip_08220481645'); clear_me_08220481645('form_res_type_08220481645'); clear_me_08220481645('form_dock_type_08220481645'); clear_me_08220481645('form_api_rates_08220481645'); clear_me_08220481645('form_foxy_form_08220481645'); clear_me_08220481645('loading_gif_08220481645'); // reset all forms delivery_type_empty_html_08220481645(); zip_code_empty_html_08220481645(); res_add_empty_html_08220481645(); dock_add_empty_html_08220481645(); email_empty_html_08220481645(); // align info left $('#form_delivery_type_08220481645').attr('align','center') // show directions lang $('#pls_asw_08220481645').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_08220481645').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_08220481645=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220481645=='1'){ // build fc form build_foxycart_form_08220481645(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220481645').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220481645').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220481645').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220481645').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-1645" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_08220481645').val('HGR To Assist'); $('#shp_price_08220481645').val('$0.00'); $('#hand_fee_08220481645').val('$0.00'); // submit fc form $('#foxy_cart_final_form_08220481645').submit(); // clear form data $('#form_foxy_form_08220481645').html(''); // hide the modal $('#modal_08220481645').modal('hide'); clear_foxy_cart_form_08220481645(); // change add to cart button status to added add_to_cart_status('add', '08220481645'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_08220481645=localStorage.getItem("atc_international"); if(is_international_ship_set_08220481645=='1'){ // build fc form build_foxycart_form_08220481645(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220481645').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220481645').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220481645').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220481645').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-1645" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_08220481645').val('HGR To Assist'); $('#shp_name_08220481645').val('HGR To Assist'); $('#shp_price_08220481645').val('TBD'); $('#hand_fee_08220481645').val('TBD'); // submit fc form $('#foxy_cart_final_form_08220481645').submit(); // clear form data $('#form_foxy_form_08220481645').html(''); // hide the modal $('#modal_08220481645').modal('hide'); clear_foxy_cart_form_08220481645(); // change add to cart button status to added add_to_cart_status('add', '08220481645'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_08220481645(); $('#form_delivery_type_08220481645').show(); // hide pls_asw_ hide_me_08220481645('pls_asw_08220481645'); //// populate and show zip form // zip_code_empty_html_08220481645(); // $('#form_zip_08220481645').show(); // $('#continue_zip_08220481645 ').show(); // $('#continue_international_08220481645 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220481645(); $('#form_email_08220481645').show(); // poplate and show zip zip_code_empty_html_08220481645(); $('#form_zip_08220481645').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220481645(); $('#form_email_08220481645').show(); $('#continue_email_08220481645 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_08220481645(); $('#form_delivery_type_08220481645').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_08220481645(); $('#shp_type_08220481645').val('PICKUP'); $('#shp_name_08220481645').val('PICKUP') $('#shp_price_08220481645').val('$0.00'); $('#shp_zip_08220481645').val('00000'); $('#hand_fee_08220481645').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_08220481645(); $('#form_email_08220481645').show(); build_foxycart_form_08220481645(); $('#continue_rates_08220481645').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_08220481645(); $('#form_email_08220481645').show(); $('#continue_email_08220481645 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_08220481645(); $('#form_delivery_type_08220481645').show(); } }); }); function delivery_type_empty_html_08220481645(){ // change header lang $('#ModalLabel08220481645').html(''); $('#ModalLabel08220481645').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_08220481645').html(''); $('#pls_asw_08220481645').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_08220481645’).html(“); // populate form delivery_type html $(‘#form_delivery_type_08220481645’).html(`

`); } function delivery_type_set_html_08220481645(){ if(max_qty_avail_08220481645>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel08220481645’).html(”); $(‘#ModalLabel08220481645’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_08220481645’).hide(); $(‘#is_pickup_08220481645’).hide(); // align info left $(‘#form_delivery_type_08220481645’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220481645’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_08220481645’).hide(); // center the directions lang $(‘#form_delivery_type_08220481645’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_08220481645’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel08220481645’).html(”); $(‘#ModalLabel08220481645’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_08220481645’).hide(); $(‘#is_pickup_08220481645’).hide(); // align info left $(‘#form_delivery_type_08220481645’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220481645’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_08220481645’).hide(); // center the directions lang $(‘#form_delivery_type_08220481645’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_08220481645’ ,function(){ jQuery(‘#modal_08220481645’).modal(‘hide’); jQuery(‘#modal_qty_08220481645’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_08220481645" ).click(function() { // if email valid if($('#ship_email_08220481645').val() !='' && validateEmail($('#ship_email_08220481645').val())===true){ // set email/country val atc_email_val = $('#ship_email_08220481645').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_08220481645(); // hide contine email & international buttons $('#continue_email_08220481645').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_08220481645(); $('#form_zip_08220481645').show(); $('#continue_zip_08220481645').show(); $('#continue_international_08220481645 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_08220481645(); $('#continue_rates_08220481645').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_08220481645' ,function(){ //abort rates post if exists if (typeof rates_post_08220481645 !== 'undefined') { rates_post_08220481645.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_08220481645 ').hide(); $('#continue_zip_08220481645 ').hide(); $('#continue_international_08220481645 ').hide(); // empty and show email/country form email_empty_html_08220481645(); // show contine email/iternational button $('#continue_email_08220481645').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_08220481645('form_zip_'); hide_me_08220481645('form_zip_'); // empty res form //clear_me_08220481645('form_res_type_'); hide_me_08220481645('form_res_type_'); // empty loading div //clear_me_08220481645('loading_gif_'); hide_me_08220481645('loading_gif_'); // empty rates form //clear_me_08220481645('form_api_rates_'); hide_me_08220481645('form_api_rates_'); // hide rates continue button hide_me_08220481645('continue_rates'); // empty doctype form //clear_me_08220481645('form_dock_type_'); hide_me_08220481645('form_dock_type_'); // empty foxy form //clear_me_08220481645('form_foxy_form_'); //hide_me_08220481645('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_08220481645]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_08220481645').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_08220481645(); // hide contine email / international button $('#continue_email_08220481645').hide(); $('#form_email_08220481645').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_08220481645(); $('#form_zip_08220481645').show(); $('#continue_zip_08220481645').show(); $('#continue_international_08220481645 ').show(); } } }); }); function email_empty_html_08220481645(){ // clear form email html $('#form_email_08220481645').html(“); // populate form email html $('#form_email_08220481645').html(` 1. What is your email address? `); } function email_set_html_08220481645(){ // clear form email html $('#form_email_08220481645').html(“); // populate form email html $('#form_email_08220481645').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_08220481645" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_08220481645').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_08220481645').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_08220481645(); // hide contine zip & international buttons $('#continue_zip_08220481645').hide(); $('#continue_international_08220481645').hide(); // Show empty residential form res_add_empty_html_08220481645(); $('#form_res_type_08220481645').show(); }); } }); // END click contine zip // START click international $( "#continue_international_08220481645" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_08220481645(); // hide contine zip & international buttons $('#continue_zip_08220481645').hide(); $('#continue_international_08220481645').hide(); $('#chosen_rate').html(''); $('#form_api_rates_08220481645').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_08220481645(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_08220481645’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_08220481645_99’).click(); $(‘#form_api_rates_08220481645’).show(); $(‘#continue_rates_08220481645’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_08220481645’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_08220481645 !== ‘undefined’) { rates_post_08220481645.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_08220481645(); // show contine zip/iternational button $(‘#continue_zip_08220481645’).show(); $(‘#continue_international_08220481645’).show(); hide_me_08220481645(‘form_res_type_08220481645’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_08220481645]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_08220481645(); // clear dock type cookie and local storage clear_dock_type_storage_08220481645(); // empty res form clear_me_08220481645(‘form_res_type_’); hide_me_08220481645(‘form_res_type_’); // empty loading div clear_me_08220481645(‘loading_gif_’); hide_me_08220481645(‘loading_gif_’); // empty rates form clear_me_08220481645(‘form_api_rates_’); hide_me_08220481645(‘form_api_rates_’); // hide rates continue button hide_me_08220481645(‘continue_rates’); // empty doctype form clear_me_08220481645(‘form_dock_type_’); hide_me_08220481645(‘form_dock_type_’); // empty foxy form clear_me_08220481645(‘form_foxy_form_’); hide_me_08220481645(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_08220481645]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_08220481645’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_08220481645(); // hide contine zip / international button $(‘#continue_zip_08220481645’).hide(); $(‘#continue_international_08220481645’).hide(); $(‘#continue_rates_08220481645’).hide(); // poplate and show res form res_add_empty_html_08220481645(); $(‘#form_res_type_08220481645’).show(); } }); }); function zip_code_empty_html_08220481645(){ // clear form zip html $(‘#form_zip_08220481645’).html(“); // populate form zip html $(‘#form_zip_08220481645’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_08220481645(){ // clear form zip html $(‘#form_zip_08220481645’).html(“); // populate form zip html $(‘#form_zip_08220481645’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_08220481645(yes_no){ $(‘#form_res_type_08220481645’).html(“); // populate form res html $(‘#form_res_type_08220481645’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_08220481645(yes_no){ $(‘#form_dock_type_08220481645’).html(“); // populate dock form html $(‘#form_dock_type_08220481645’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_08220481645; function get_rates_08220481645(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_08220481645=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220481645=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0822-048-1645'; rates_atc_item_price='18.99'; rates_atc_name='Shop Vac'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='40'; rates_atc_length='19'; rates_atc_width='17'; rates_atc_height='54'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/1022/0822048/20221010154403139_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_08220481645').html(''); $('#form_api_rates_08220481645').hide(); $('#pls_asw_08220481645').hide(); $('#loading_gif_08220481645').html(''); $('#loading_gif_08220481645').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_08220481645’).show(); //send data to api rates_post_08220481645 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0822-048-1645’, rates_atc_itemname_post: ‘Shop Vac’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_08220481645 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_08220481645’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_08220481645=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_08220481645.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_08220481645’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_08220481645.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_08220481645’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_08220481645’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220481645(); $(‘#shp_type_08220481645’).val(‘TBD’); $(‘#shp_name_08220481645’).val(‘TBD’) $(‘#shp_price_08220481645’).val(‘TBD’); $(‘#hand_fee_08220481645’).val(‘TBD’); $(‘#continue_rates_08220481645’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_08220481645’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_08220481645’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_08220481645’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220481645(); $(‘#shp_type_08220481645’).val(‘TBD’); $(‘#shp_name_08220481645’).val(‘TBD’) $(‘#shp_price_08220481645’).val(‘TBD’); $(‘#hand_fee_08220481645’).val(‘TBD’); //rate_item_price_08220481645=’18.99′; // $(‘#price’).val((Number(rate_item_price_08220481645) + Number(rate_info_price_08220481645)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_08220481645’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_08220481645’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_08220481645’).append(”); // clear and hide the loading gif $(‘#loading_gif_08220481645’).html(”); $(‘#loading_gif_08220481645’).hide(); // show the shipping rates div $(‘#form_api_rates_08220481645’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_08220481645.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_08220481645’).html(”); $(‘#form_api_rates_08220481645’).hide(); //$(‘#pls_asw_08220481645’).show(); $(‘#loading_gif_08220481645’).html(”); $(‘#loading_gif_08220481645’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_08220481645').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_08220481645').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_08220481645').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel08220481645').html(''); //$('#ModalLabel08220481645').html(`Delivery Type`); //// change directions lang //$('#pls_asw_08220481645').html(''); //$('#pls_asw_08220481645').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_08220481645’).show(); //// show delivery type buttons //$(‘#is_ship_08220481645’).show(); //$(‘#is_pickup_08220481645’).show(); //zip_code_empty_html_08220481645(); //res_add_empty_html_08220481645(); //dock_add_empty_html_08220481645(); //delivery_type_empty_html_08220481645(); // //$(‘#loading_gif_08220481645’).html(”); //$(‘#loading_gif_08220481645’).hide(); //$(‘#form_api_rates_08220481645’).html(”); //$(‘#form_api_rates_08220481645’).hide(); hide_me_08220481645(‘form_delivery_type_08220481645’); hide_me_08220481645(‘form_zip_08220481645’); hide_me_08220481645(‘form_res_type_08220481645’); hide_me_08220481645(‘form_dock_type_08220481645’); hide_me_08220481645(‘form_api_rates_08220481645’); hide_me_08220481645(‘form_foxy_form_08220481645’); hide_me_08220481645(‘loading_gif_08220481645’); hide_me_08220481645(‘continue_rates_08220481645’); hide_me_08220481645(‘continue_zip_08220481645’); hide_me_08220481645(‘continue_international_08220481645’); clear_me_08220481645(‘form_delivery_type_08220481645’); clear_me_08220481645(‘form_zip_08220481645’); clear_me_08220481645(‘form_res_type_08220481645’); clear_me_08220481645(‘form_dock_type_08220481645’); clear_me_08220481645(‘form_api_rates_08220481645’); clear_me_08220481645(‘form_foxy_form_08220481645’); clear_me_08220481645(‘loading_gif_08220481645’); }); }); // hide id starting with function hide_me_08220481645(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_08220481645(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_08220481645(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_08220481645(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_08220481645’).modal(‘hide’); jQuery(‘#modal_08220481645’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_08220481645(){ // clear form zip html $(‘#form_qty_08220481645’).html(“); // populate form zip html $(‘#form_qty_08220481645’).html(`

How many would you like?(`+max_qty_avail_08220481645+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0822-048-1645” }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0822-048-1645’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ‘Right Stuff Industrial’, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0822-048-1645’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0822-048-1645_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0822-048-1645_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0822-048-1645_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-12:hidden').length) { }else{ get_thumbs(12, 20855, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0822-048-0317') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-12:hidden').length) { }else{ get_thumbs(12, 20855, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0822-048-0317') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0822-048-0317
Quantity
1
Manufacturer
Dayton
Model Number
2V341
Serial Number Make Year
Capacity
60 WATTS
Electrical
Dimensions L x W x H (inches)
9 x 6 x 4
Weight (lb)
2
Showroom Aisle
006
Showroom Bay
0832
Category
Shop Equipment
Location
Watertown, WI
Item Details

Dayton

Shop Light

Watertown, WI

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_08220480317' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_08220480317(); build_foxycart_form_08220480317(); $('#shp_type_08220480317').val('PICKUP'); $('#shp_name_08220480317').val('PICKUP') $('#shp_price_08220480317').val('$0.00'); $('#hand_fee_08220480317').val('$0.00'); $('#shp_zip_08220480317').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480317(); $('#form_email_08220480317').show(); build_foxycart_form_08220480317(); $('#continue_rates_08220480317').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480317(); $('#form_email_08220480317').show(); $('#continue_email_08220480317 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_08220480317' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_08220480317(); // populate and show zip code / country form and zip code button //zip_code_empty_html_08220480317(); // $('#form_zip_08220480317').show(); // $('#continue_zip_08220480317 ').show(); // $('#continue_international_08220480317 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480317(); $('#form_email_08220480317').show(); // poplate and show zip zip_code_empty_html_08220480317(); $('#form_zip_08220480317').show(); $('#continue_zip_08220480317 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480317(); $('#form_email_08220480317').show(); $('#continue_email_08220480317 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_08220480317' ,function(){ //abort rates post if exists if (typeof rates_post_08220480317 !== 'undefined') { rates_post_08220480317.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_08220480317('form_email_08220480317'); hide_me_08220480317('form_zip_08220480317'); hide_me_08220480317('form_res_type_08220480317'); hide_me_08220480317('form_dock_type_08220480317'); hide_me_08220480317('form_api_rates_08220480317'); hide_me_08220480317('form_foxy_form_08220480317'); hide_me_08220480317('loading_gif_08220480317'); hide_me_08220480317('continue_rates_08220480317'); hide_me_08220480317('continue_zip_08220480317'); hide_me_08220480317('continue_email_08220480317'); hide_me_08220480317('continue_international_08220480317'); clear_me_08220480317('form_email_08220480317'); clear_me_08220480317('form_zip_08220480317'); clear_me_08220480317('form_res_type_08220480317'); clear_me_08220480317('form_dock_type_08220480317'); clear_me_08220480317('form_api_rates_08220480317'); clear_me_08220480317('form_foxy_form_08220480317'); clear_me_08220480317('loading_gif_08220480317'); // reset all forms delivery_type_empty_html_08220480317(); zip_code_empty_html_08220480317(); res_add_empty_html_08220480317(); dock_add_empty_html_08220480317(); email_empty_html_08220480317(); // align info left $('#form_delivery_type_08220480317').attr('align','center') // show directions lang $('#pls_asw_08220480317').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_08220480317').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_08220480317=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220480317=='1'){ // build fc form build_foxycart_form_08220480317(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220480317').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220480317').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220480317').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220480317').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-0317" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_08220480317').val('HGR To Assist'); $('#shp_price_08220480317').val('$0.00'); $('#hand_fee_08220480317').val('$0.00'); // submit fc form $('#foxy_cart_final_form_08220480317').submit(); // clear form data $('#form_foxy_form_08220480317').html(''); // hide the modal $('#modal_08220480317').modal('hide'); clear_foxy_cart_form_08220480317(); // change add to cart button status to added add_to_cart_status('add', '08220480317'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_08220480317=localStorage.getItem("atc_international"); if(is_international_ship_set_08220480317=='1'){ // build fc form build_foxycart_form_08220480317(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220480317').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220480317').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220480317').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220480317').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-0317" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_08220480317').val('HGR To Assist'); $('#shp_name_08220480317').val('HGR To Assist'); $('#shp_price_08220480317').val('TBD'); $('#hand_fee_08220480317').val('TBD'); // submit fc form $('#foxy_cart_final_form_08220480317').submit(); // clear form data $('#form_foxy_form_08220480317').html(''); // hide the modal $('#modal_08220480317').modal('hide'); clear_foxy_cart_form_08220480317(); // change add to cart button status to added add_to_cart_status('add', '08220480317'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_08220480317(); $('#form_delivery_type_08220480317').show(); // hide pls_asw_ hide_me_08220480317('pls_asw_08220480317'); //// populate and show zip form // zip_code_empty_html_08220480317(); // $('#form_zip_08220480317').show(); // $('#continue_zip_08220480317 ').show(); // $('#continue_international_08220480317 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480317(); $('#form_email_08220480317').show(); // poplate and show zip zip_code_empty_html_08220480317(); $('#form_zip_08220480317').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480317(); $('#form_email_08220480317').show(); $('#continue_email_08220480317 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_08220480317(); $('#form_delivery_type_08220480317').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_08220480317(); $('#shp_type_08220480317').val('PICKUP'); $('#shp_name_08220480317').val('PICKUP') $('#shp_price_08220480317').val('$0.00'); $('#shp_zip_08220480317').val('00000'); $('#hand_fee_08220480317').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_08220480317(); $('#form_email_08220480317').show(); build_foxycart_form_08220480317(); $('#continue_rates_08220480317').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_08220480317(); $('#form_email_08220480317').show(); $('#continue_email_08220480317 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_08220480317(); $('#form_delivery_type_08220480317').show(); } }); }); function delivery_type_empty_html_08220480317(){ // change header lang $('#ModalLabel08220480317').html(''); $('#ModalLabel08220480317').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_08220480317').html(''); $('#pls_asw_08220480317').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_08220480317’).html(“); // populate form delivery_type html $(‘#form_delivery_type_08220480317’).html(`

`); } function delivery_type_set_html_08220480317(){ if(max_qty_avail_08220480317>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel08220480317’).html(”); $(‘#ModalLabel08220480317’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_08220480317’).hide(); $(‘#is_pickup_08220480317’).hide(); // align info left $(‘#form_delivery_type_08220480317’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220480317’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_08220480317’).hide(); // center the directions lang $(‘#form_delivery_type_08220480317’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_08220480317’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel08220480317’).html(”); $(‘#ModalLabel08220480317’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_08220480317’).hide(); $(‘#is_pickup_08220480317’).hide(); // align info left $(‘#form_delivery_type_08220480317’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220480317’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_08220480317’).hide(); // center the directions lang $(‘#form_delivery_type_08220480317’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_08220480317’ ,function(){ jQuery(‘#modal_08220480317’).modal(‘hide’); jQuery(‘#modal_qty_08220480317’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_08220480317" ).click(function() { // if email valid if($('#ship_email_08220480317').val() !='' && validateEmail($('#ship_email_08220480317').val())===true){ // set email/country val atc_email_val = $('#ship_email_08220480317').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_08220480317(); // hide contine email & international buttons $('#continue_email_08220480317').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_08220480317(); $('#form_zip_08220480317').show(); $('#continue_zip_08220480317').show(); $('#continue_international_08220480317 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_08220480317(); $('#continue_rates_08220480317').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_08220480317' ,function(){ //abort rates post if exists if (typeof rates_post_08220480317 !== 'undefined') { rates_post_08220480317.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_08220480317 ').hide(); $('#continue_zip_08220480317 ').hide(); $('#continue_international_08220480317 ').hide(); // empty and show email/country form email_empty_html_08220480317(); // show contine email/iternational button $('#continue_email_08220480317').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_08220480317('form_zip_'); hide_me_08220480317('form_zip_'); // empty res form //clear_me_08220480317('form_res_type_'); hide_me_08220480317('form_res_type_'); // empty loading div //clear_me_08220480317('loading_gif_'); hide_me_08220480317('loading_gif_'); // empty rates form //clear_me_08220480317('form_api_rates_'); hide_me_08220480317('form_api_rates_'); // hide rates continue button hide_me_08220480317('continue_rates'); // empty doctype form //clear_me_08220480317('form_dock_type_'); hide_me_08220480317('form_dock_type_'); // empty foxy form //clear_me_08220480317('form_foxy_form_'); //hide_me_08220480317('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_08220480317]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_08220480317').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_08220480317(); // hide contine email / international button $('#continue_email_08220480317').hide(); $('#form_email_08220480317').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_08220480317(); $('#form_zip_08220480317').show(); $('#continue_zip_08220480317').show(); $('#continue_international_08220480317 ').show(); } } }); }); function email_empty_html_08220480317(){ // clear form email html $('#form_email_08220480317').html(“); // populate form email html $('#form_email_08220480317').html(` 1. What is your email address? `); } function email_set_html_08220480317(){ // clear form email html $('#form_email_08220480317').html(“); // populate form email html $('#form_email_08220480317').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_08220480317" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_08220480317').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_08220480317').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_08220480317(); // hide contine zip & international buttons $('#continue_zip_08220480317').hide(); $('#continue_international_08220480317').hide(); // Show empty residential form res_add_empty_html_08220480317(); $('#form_res_type_08220480317').show(); }); } }); // END click contine zip // START click international $( "#continue_international_08220480317" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_08220480317(); // hide contine zip & international buttons $('#continue_zip_08220480317').hide(); $('#continue_international_08220480317').hide(); $('#chosen_rate').html(''); $('#form_api_rates_08220480317').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_08220480317(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_08220480317’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_08220480317_99’).click(); $(‘#form_api_rates_08220480317’).show(); $(‘#continue_rates_08220480317’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_08220480317’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_08220480317 !== ‘undefined’) { rates_post_08220480317.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_08220480317(); // show contine zip/iternational button $(‘#continue_zip_08220480317’).show(); $(‘#continue_international_08220480317’).show(); hide_me_08220480317(‘form_res_type_08220480317’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_08220480317]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_08220480317(); // clear dock type cookie and local storage clear_dock_type_storage_08220480317(); // empty res form clear_me_08220480317(‘form_res_type_’); hide_me_08220480317(‘form_res_type_’); // empty loading div clear_me_08220480317(‘loading_gif_’); hide_me_08220480317(‘loading_gif_’); // empty rates form clear_me_08220480317(‘form_api_rates_’); hide_me_08220480317(‘form_api_rates_’); // hide rates continue button hide_me_08220480317(‘continue_rates’); // empty doctype form clear_me_08220480317(‘form_dock_type_’); hide_me_08220480317(‘form_dock_type_’); // empty foxy form clear_me_08220480317(‘form_foxy_form_’); hide_me_08220480317(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_08220480317]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_08220480317’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_08220480317(); // hide contine zip / international button $(‘#continue_zip_08220480317’).hide(); $(‘#continue_international_08220480317’).hide(); $(‘#continue_rates_08220480317’).hide(); // poplate and show res form res_add_empty_html_08220480317(); $(‘#form_res_type_08220480317’).show(); } }); }); function zip_code_empty_html_08220480317(){ // clear form zip html $(‘#form_zip_08220480317’).html(“); // populate form zip html $(‘#form_zip_08220480317’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_08220480317(){ // clear form zip html $(‘#form_zip_08220480317’).html(“); // populate form zip html $(‘#form_zip_08220480317’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_08220480317(yes_no){ $(‘#form_res_type_08220480317’).html(“); // populate form res html $(‘#form_res_type_08220480317’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_08220480317(yes_no){ $(‘#form_dock_type_08220480317’).html(“); // populate dock form html $(‘#form_dock_type_08220480317’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_08220480317; function get_rates_08220480317(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_08220480317=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220480317=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0822-048-0317'; rates_atc_item_price='18.99'; rates_atc_name='Shop Light'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='2'; rates_atc_length='9'; rates_atc_width='6'; rates_atc_height='4'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0822/0822048/20220805163459527_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_08220480317').html(''); $('#form_api_rates_08220480317').hide(); $('#pls_asw_08220480317').hide(); $('#loading_gif_08220480317').html(''); $('#loading_gif_08220480317').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_08220480317’).show(); //send data to api rates_post_08220480317 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0822-048-0317’, rates_atc_itemname_post: ‘Shop Light’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_08220480317 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_08220480317’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_08220480317=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_08220480317.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_08220480317’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_08220480317.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_08220480317’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_08220480317’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220480317(); $(‘#shp_type_08220480317’).val(‘TBD’); $(‘#shp_name_08220480317’).val(‘TBD’) $(‘#shp_price_08220480317’).val(‘TBD’); $(‘#hand_fee_08220480317’).val(‘TBD’); $(‘#continue_rates_08220480317’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_08220480317’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_08220480317’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_08220480317’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220480317(); $(‘#shp_type_08220480317’).val(‘TBD’); $(‘#shp_name_08220480317’).val(‘TBD’) $(‘#shp_price_08220480317’).val(‘TBD’); $(‘#hand_fee_08220480317’).val(‘TBD’); //rate_item_price_08220480317=’18.99′; // $(‘#price’).val((Number(rate_item_price_08220480317) + Number(rate_info_price_08220480317)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_08220480317’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_08220480317’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_08220480317’).append(”); // clear and hide the loading gif $(‘#loading_gif_08220480317’).html(”); $(‘#loading_gif_08220480317’).hide(); // show the shipping rates div $(‘#form_api_rates_08220480317’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_08220480317.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_08220480317’).html(”); $(‘#form_api_rates_08220480317’).hide(); //$(‘#pls_asw_08220480317’).show(); $(‘#loading_gif_08220480317’).html(”); $(‘#loading_gif_08220480317’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_08220480317').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_08220480317').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_08220480317').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel08220480317').html(''); //$('#ModalLabel08220480317').html(`Delivery Type`); //// change directions lang //$('#pls_asw_08220480317').html(''); //$('#pls_asw_08220480317').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_08220480317’).show(); //// show delivery type buttons //$(‘#is_ship_08220480317’).show(); //$(‘#is_pickup_08220480317’).show(); //zip_code_empty_html_08220480317(); //res_add_empty_html_08220480317(); //dock_add_empty_html_08220480317(); //delivery_type_empty_html_08220480317(); // //$(‘#loading_gif_08220480317’).html(”); //$(‘#loading_gif_08220480317’).hide(); //$(‘#form_api_rates_08220480317’).html(”); //$(‘#form_api_rates_08220480317’).hide(); hide_me_08220480317(‘form_delivery_type_08220480317’); hide_me_08220480317(‘form_zip_08220480317’); hide_me_08220480317(‘form_res_type_08220480317’); hide_me_08220480317(‘form_dock_type_08220480317’); hide_me_08220480317(‘form_api_rates_08220480317’); hide_me_08220480317(‘form_foxy_form_08220480317’); hide_me_08220480317(‘loading_gif_08220480317’); hide_me_08220480317(‘continue_rates_08220480317’); hide_me_08220480317(‘continue_zip_08220480317’); hide_me_08220480317(‘continue_international_08220480317’); clear_me_08220480317(‘form_delivery_type_08220480317’); clear_me_08220480317(‘form_zip_08220480317’); clear_me_08220480317(‘form_res_type_08220480317’); clear_me_08220480317(‘form_dock_type_08220480317’); clear_me_08220480317(‘form_api_rates_08220480317’); clear_me_08220480317(‘form_foxy_form_08220480317’); clear_me_08220480317(‘loading_gif_08220480317’); }); }); // hide id starting with function hide_me_08220480317(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_08220480317(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_08220480317(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_08220480317(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_08220480317’).modal(‘hide’); jQuery(‘#modal_08220480317’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_08220480317(){ // clear form zip html $(‘#form_qty_08220480317’).html(“); // populate form zip html $(‘#form_qty_08220480317’).html(`

How many would you like?(`+max_qty_avail_08220480317+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0822-048-0317” }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0822-048-0317’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ‘Dayton’, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0822-048-0317’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0822-048-0317_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0822-048-0317_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0822-048-0317_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-13:hidden').length) { }else{ get_thumbs(13, 19352, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0414-083-3191') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-13:hidden').length) { }else{ get_thumbs(13, 19352, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0414-083-3191') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0414-083-3191
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
12 x 12 x 5
Weight (lb)
7
Showroom Aisle
06B
Showroom Bay
1312
Category
Hardware
Location
Euclid, OH
Item Details

Shop Equipment

Euclid, OH

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_04140833191' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_04140833191(); build_foxycart_form_04140833191(); $('#shp_type_04140833191').val('PICKUP'); $('#shp_name_04140833191').val('PICKUP') $('#shp_price_04140833191').val('$0.00'); $('#hand_fee_04140833191').val('$0.00'); $('#shp_zip_04140833191').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_04140833191(); $('#form_email_04140833191').show(); build_foxycart_form_04140833191(); $('#continue_rates_04140833191').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_04140833191(); $('#form_email_04140833191').show(); $('#continue_email_04140833191 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_04140833191' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_04140833191(); // populate and show zip code / country form and zip code button //zip_code_empty_html_04140833191(); // $('#form_zip_04140833191').show(); // $('#continue_zip_04140833191 ').show(); // $('#continue_international_04140833191 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_04140833191(); $('#form_email_04140833191').show(); // poplate and show zip zip_code_empty_html_04140833191(); $('#form_zip_04140833191').show(); $('#continue_zip_04140833191 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_04140833191(); $('#form_email_04140833191').show(); $('#continue_email_04140833191 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_04140833191' ,function(){ //abort rates post if exists if (typeof rates_post_04140833191 !== 'undefined') { rates_post_04140833191.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_04140833191('form_email_04140833191'); hide_me_04140833191('form_zip_04140833191'); hide_me_04140833191('form_res_type_04140833191'); hide_me_04140833191('form_dock_type_04140833191'); hide_me_04140833191('form_api_rates_04140833191'); hide_me_04140833191('form_foxy_form_04140833191'); hide_me_04140833191('loading_gif_04140833191'); hide_me_04140833191('continue_rates_04140833191'); hide_me_04140833191('continue_zip_04140833191'); hide_me_04140833191('continue_email_04140833191'); hide_me_04140833191('continue_international_04140833191'); clear_me_04140833191('form_email_04140833191'); clear_me_04140833191('form_zip_04140833191'); clear_me_04140833191('form_res_type_04140833191'); clear_me_04140833191('form_dock_type_04140833191'); clear_me_04140833191('form_api_rates_04140833191'); clear_me_04140833191('form_foxy_form_04140833191'); clear_me_04140833191('loading_gif_04140833191'); // reset all forms delivery_type_empty_html_04140833191(); zip_code_empty_html_04140833191(); res_add_empty_html_04140833191(); dock_add_empty_html_04140833191(); email_empty_html_04140833191(); // align info left $('#form_delivery_type_04140833191').attr('align','center') // show directions lang $('#pls_asw_04140833191').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_04140833191').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_04140833191=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_04140833191=='1'){ // build fc form build_foxycart_form_04140833191(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_04140833191').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_04140833191').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_04140833191').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_04140833191').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0414-083-3191" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_04140833191').val('HGR To Assist'); $('#shp_price_04140833191').val('$0.00'); $('#hand_fee_04140833191').val('$0.00'); // submit fc form $('#foxy_cart_final_form_04140833191').submit(); // clear form data $('#form_foxy_form_04140833191').html(''); // hide the modal $('#modal_04140833191').modal('hide'); clear_foxy_cart_form_04140833191(); // change add to cart button status to added add_to_cart_status('add', '04140833191'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_04140833191=localStorage.getItem("atc_international"); if(is_international_ship_set_04140833191=='1'){ // build fc form build_foxycart_form_04140833191(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_04140833191').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_04140833191').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_04140833191').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_04140833191').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0414-083-3191" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_04140833191').val('HGR To Assist'); $('#shp_name_04140833191').val('HGR To Assist'); $('#shp_price_04140833191').val('TBD'); $('#hand_fee_04140833191').val('TBD'); // submit fc form $('#foxy_cart_final_form_04140833191').submit(); // clear form data $('#form_foxy_form_04140833191').html(''); // hide the modal $('#modal_04140833191').modal('hide'); clear_foxy_cart_form_04140833191(); // change add to cart button status to added add_to_cart_status('add', '04140833191'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_04140833191(); $('#form_delivery_type_04140833191').show(); // hide pls_asw_ hide_me_04140833191('pls_asw_04140833191'); //// populate and show zip form // zip_code_empty_html_04140833191(); // $('#form_zip_04140833191').show(); // $('#continue_zip_04140833191 ').show(); // $('#continue_international_04140833191 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_04140833191(); $('#form_email_04140833191').show(); // poplate and show zip zip_code_empty_html_04140833191(); $('#form_zip_04140833191').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_04140833191(); $('#form_email_04140833191').show(); $('#continue_email_04140833191 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_04140833191(); $('#form_delivery_type_04140833191').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_04140833191(); $('#shp_type_04140833191').val('PICKUP'); $('#shp_name_04140833191').val('PICKUP') $('#shp_price_04140833191').val('$0.00'); $('#shp_zip_04140833191').val('00000'); $('#hand_fee_04140833191').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_04140833191(); $('#form_email_04140833191').show(); build_foxycart_form_04140833191(); $('#continue_rates_04140833191').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_04140833191(); $('#form_email_04140833191').show(); $('#continue_email_04140833191 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_04140833191(); $('#form_delivery_type_04140833191').show(); } }); }); function delivery_type_empty_html_04140833191(){ // change header lang $('#ModalLabel04140833191').html(''); $('#ModalLabel04140833191').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_04140833191').html(''); $('#pls_asw_04140833191').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_04140833191’).html(“); // populate form delivery_type html $(‘#form_delivery_type_04140833191’).html(`

`); } function delivery_type_set_html_04140833191(){ if(max_qty_avail_04140833191>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel04140833191’).html(”); $(‘#ModalLabel04140833191’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_04140833191’).hide(); $(‘#is_pickup_04140833191’).hide(); // align info left $(‘#form_delivery_type_04140833191’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_04140833191’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_04140833191’).hide(); // center the directions lang $(‘#form_delivery_type_04140833191’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_04140833191’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel04140833191’).html(”); $(‘#ModalLabel04140833191’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_04140833191’).hide(); $(‘#is_pickup_04140833191’).hide(); // align info left $(‘#form_delivery_type_04140833191’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_04140833191’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_04140833191’).hide(); // center the directions lang $(‘#form_delivery_type_04140833191’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_04140833191’ ,function(){ jQuery(‘#modal_04140833191’).modal(‘hide’); jQuery(‘#modal_qty_04140833191’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_04140833191" ).click(function() { // if email valid if($('#ship_email_04140833191').val() !='' && validateEmail($('#ship_email_04140833191').val())===true){ // set email/country val atc_email_val = $('#ship_email_04140833191').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_04140833191(); // hide contine email & international buttons $('#continue_email_04140833191').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_04140833191(); $('#form_zip_04140833191').show(); $('#continue_zip_04140833191').show(); $('#continue_international_04140833191 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_04140833191(); $('#continue_rates_04140833191').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_04140833191' ,function(){ //abort rates post if exists if (typeof rates_post_04140833191 !== 'undefined') { rates_post_04140833191.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_04140833191 ').hide(); $('#continue_zip_04140833191 ').hide(); $('#continue_international_04140833191 ').hide(); // empty and show email/country form email_empty_html_04140833191(); // show contine email/iternational button $('#continue_email_04140833191').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_04140833191('form_zip_'); hide_me_04140833191('form_zip_'); // empty res form //clear_me_04140833191('form_res_type_'); hide_me_04140833191('form_res_type_'); // empty loading div //clear_me_04140833191('loading_gif_'); hide_me_04140833191('loading_gif_'); // empty rates form //clear_me_04140833191('form_api_rates_'); hide_me_04140833191('form_api_rates_'); // hide rates continue button hide_me_04140833191('continue_rates'); // empty doctype form //clear_me_04140833191('form_dock_type_'); hide_me_04140833191('form_dock_type_'); // empty foxy form //clear_me_04140833191('form_foxy_form_'); //hide_me_04140833191('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_04140833191]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_04140833191').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_04140833191(); // hide contine email / international button $('#continue_email_04140833191').hide(); $('#form_email_04140833191').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_04140833191(); $('#form_zip_04140833191').show(); $('#continue_zip_04140833191').show(); $('#continue_international_04140833191 ').show(); } } }); }); function email_empty_html_04140833191(){ // clear form email html $('#form_email_04140833191').html(“); // populate form email html $('#form_email_04140833191').html(` 1. What is your email address? `); } function email_set_html_04140833191(){ // clear form email html $('#form_email_04140833191').html(“); // populate form email html $('#form_email_04140833191').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_04140833191" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_04140833191').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_04140833191').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_04140833191(); // hide contine zip & international buttons $('#continue_zip_04140833191').hide(); $('#continue_international_04140833191').hide(); // Show empty residential form res_add_empty_html_04140833191(); $('#form_res_type_04140833191').show(); }); } }); // END click contine zip // START click international $( "#continue_international_04140833191" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_04140833191(); // hide contine zip & international buttons $('#continue_zip_04140833191').hide(); $('#continue_international_04140833191').hide(); $('#chosen_rate').html(''); $('#form_api_rates_04140833191').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_04140833191(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_04140833191’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_04140833191_99’).click(); $(‘#form_api_rates_04140833191’).show(); $(‘#continue_rates_04140833191’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_04140833191’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_04140833191 !== ‘undefined’) { rates_post_04140833191.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_04140833191(); // show contine zip/iternational button $(‘#continue_zip_04140833191’).show(); $(‘#continue_international_04140833191’).show(); hide_me_04140833191(‘form_res_type_04140833191’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_04140833191]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_04140833191(); // clear dock type cookie and local storage clear_dock_type_storage_04140833191(); // empty res form clear_me_04140833191(‘form_res_type_’); hide_me_04140833191(‘form_res_type_’); // empty loading div clear_me_04140833191(‘loading_gif_’); hide_me_04140833191(‘loading_gif_’); // empty rates form clear_me_04140833191(‘form_api_rates_’); hide_me_04140833191(‘form_api_rates_’); // hide rates continue button hide_me_04140833191(‘continue_rates’); // empty doctype form clear_me_04140833191(‘form_dock_type_’); hide_me_04140833191(‘form_dock_type_’); // empty foxy form clear_me_04140833191(‘form_foxy_form_’); hide_me_04140833191(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_04140833191]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_04140833191’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_04140833191(); // hide contine zip / international button $(‘#continue_zip_04140833191’).hide(); $(‘#continue_international_04140833191’).hide(); $(‘#continue_rates_04140833191’).hide(); // poplate and show res form res_add_empty_html_04140833191(); $(‘#form_res_type_04140833191’).show(); } }); }); function zip_code_empty_html_04140833191(){ // clear form zip html $(‘#form_zip_04140833191’).html(“); // populate form zip html $(‘#form_zip_04140833191’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_04140833191(){ // clear form zip html $(‘#form_zip_04140833191’).html(“); // populate form zip html $(‘#form_zip_04140833191’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_04140833191(yes_no){ $(‘#form_res_type_04140833191’).html(“); // populate form res html $(‘#form_res_type_04140833191’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_04140833191(yes_no){ $(‘#form_dock_type_04140833191’).html(“); // populate dock form html $(‘#form_dock_type_04140833191’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_04140833191; function get_rates_04140833191(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_04140833191=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_04140833191=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0414-083-3191'; rates_atc_item_price='18.99'; rates_atc_name='Shop Equipment'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='7'; rates_atc_length='12'; rates_atc_width='12'; rates_atc_height='5'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0922/0414083/20220907142614439_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_04140833191').html(''); $('#form_api_rates_04140833191').hide(); $('#pls_asw_04140833191').hide(); $('#loading_gif_04140833191').html(''); $('#loading_gif_04140833191').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_04140833191’).show(); //send data to api rates_post_04140833191 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0414-083-3191’, rates_atc_itemname_post: ‘Shop Equipment’, rates_atc_item_sale_type_post: ’02’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_04140833191 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_04140833191’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_04140833191=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_04140833191.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_04140833191’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_04140833191.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_04140833191’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_04140833191’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_04140833191(); $(‘#shp_type_04140833191’).val(‘TBD’); $(‘#shp_name_04140833191’).val(‘TBD’) $(‘#shp_price_04140833191’).val(‘TBD’); $(‘#hand_fee_04140833191’).val(‘TBD’); $(‘#continue_rates_04140833191’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_04140833191’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_04140833191’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_04140833191’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_04140833191(); $(‘#shp_type_04140833191’).val(‘TBD’); $(‘#shp_name_04140833191’).val(‘TBD’) $(‘#shp_price_04140833191’).val(‘TBD’); $(‘#hand_fee_04140833191’).val(‘TBD’); //rate_item_price_04140833191=’18.99′; // $(‘#price’).val((Number(rate_item_price_04140833191) + Number(rate_info_price_04140833191)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_04140833191’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_04140833191’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_04140833191’).append(”); // clear and hide the loading gif $(‘#loading_gif_04140833191’).html(”); $(‘#loading_gif_04140833191’).hide(); // show the shipping rates div $(‘#form_api_rates_04140833191’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_04140833191.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_04140833191’).html(”); $(‘#form_api_rates_04140833191’).hide(); //$(‘#pls_asw_04140833191’).show(); $(‘#loading_gif_04140833191’).html(”); $(‘#loading_gif_04140833191’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_04140833191').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_04140833191').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_04140833191').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel04140833191').html(''); //$('#ModalLabel04140833191').html(`Delivery Type`); //// change directions lang //$('#pls_asw_04140833191').html(''); //$('#pls_asw_04140833191').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_04140833191’).show(); //// show delivery type buttons //$(‘#is_ship_04140833191’).show(); //$(‘#is_pickup_04140833191’).show(); //zip_code_empty_html_04140833191(); //res_add_empty_html_04140833191(); //dock_add_empty_html_04140833191(); //delivery_type_empty_html_04140833191(); // //$(‘#loading_gif_04140833191’).html(”); //$(‘#loading_gif_04140833191’).hide(); //$(‘#form_api_rates_04140833191’).html(”); //$(‘#form_api_rates_04140833191’).hide(); hide_me_04140833191(‘form_delivery_type_04140833191’); hide_me_04140833191(‘form_zip_04140833191’); hide_me_04140833191(‘form_res_type_04140833191’); hide_me_04140833191(‘form_dock_type_04140833191’); hide_me_04140833191(‘form_api_rates_04140833191’); hide_me_04140833191(‘form_foxy_form_04140833191’); hide_me_04140833191(‘loading_gif_04140833191’); hide_me_04140833191(‘continue_rates_04140833191’); hide_me_04140833191(‘continue_zip_04140833191’); hide_me_04140833191(‘continue_international_04140833191’); clear_me_04140833191(‘form_delivery_type_04140833191’); clear_me_04140833191(‘form_zip_04140833191’); clear_me_04140833191(‘form_res_type_04140833191’); clear_me_04140833191(‘form_dock_type_04140833191’); clear_me_04140833191(‘form_api_rates_04140833191’); clear_me_04140833191(‘form_foxy_form_04140833191’); clear_me_04140833191(‘loading_gif_04140833191’); }); }); // hide id starting with function hide_me_04140833191(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_04140833191(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_04140833191(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_04140833191(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_04140833191’).modal(‘hide’); jQuery(‘#modal_04140833191’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_04140833191(){ // clear form zip html $(‘#form_qty_04140833191’).html(“); // populate form zip html $(‘#form_qty_04140833191’).html(`

How many would you like?(`+max_qty_avail_04140833191+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0414-083-3191″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0414-083-3191’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Hardware’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0414-083-3191’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0414-083-3191_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0414-083-3191_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0414-083-3191_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-14:hidden').length) { }else{ get_thumbs(14, 20932, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0822-048-0155') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-14:hidden').length) { }else{ get_thumbs(14, 20932, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/body/item_gallery_products.gif', '', '0822-048-0155') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0822-048-0155
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
20 x 12 x 10
Weight (lb)
35
Showroom Aisle
004
Showroom Bay
0711
Category
Shop Equipment
Location
Watertown, WI
Item Details

Shop Equipment

Watertown, WI

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_08220480155' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_08220480155(); build_foxycart_form_08220480155(); $('#shp_type_08220480155').val('PICKUP'); $('#shp_name_08220480155').val('PICKUP') $('#shp_price_08220480155').val('$0.00'); $('#hand_fee_08220480155').val('$0.00'); $('#shp_zip_08220480155').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480155(); $('#form_email_08220480155').show(); build_foxycart_form_08220480155(); $('#continue_rates_08220480155').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480155(); $('#form_email_08220480155').show(); $('#continue_email_08220480155 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_08220480155' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_08220480155(); // populate and show zip code / country form and zip code button //zip_code_empty_html_08220480155(); // $('#form_zip_08220480155').show(); // $('#continue_zip_08220480155 ').show(); // $('#continue_international_08220480155 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480155(); $('#form_email_08220480155').show(); // poplate and show zip zip_code_empty_html_08220480155(); $('#form_zip_08220480155').show(); $('#continue_zip_08220480155 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480155(); $('#form_email_08220480155').show(); $('#continue_email_08220480155 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_08220480155' ,function(){ //abort rates post if exists if (typeof rates_post_08220480155 !== 'undefined') { rates_post_08220480155.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_08220480155('form_email_08220480155'); hide_me_08220480155('form_zip_08220480155'); hide_me_08220480155('form_res_type_08220480155'); hide_me_08220480155('form_dock_type_08220480155'); hide_me_08220480155('form_api_rates_08220480155'); hide_me_08220480155('form_foxy_form_08220480155'); hide_me_08220480155('loading_gif_08220480155'); hide_me_08220480155('continue_rates_08220480155'); hide_me_08220480155('continue_zip_08220480155'); hide_me_08220480155('continue_email_08220480155'); hide_me_08220480155('continue_international_08220480155'); clear_me_08220480155('form_email_08220480155'); clear_me_08220480155('form_zip_08220480155'); clear_me_08220480155('form_res_type_08220480155'); clear_me_08220480155('form_dock_type_08220480155'); clear_me_08220480155('form_api_rates_08220480155'); clear_me_08220480155('form_foxy_form_08220480155'); clear_me_08220480155('loading_gif_08220480155'); // reset all forms delivery_type_empty_html_08220480155(); zip_code_empty_html_08220480155(); res_add_empty_html_08220480155(); dock_add_empty_html_08220480155(); email_empty_html_08220480155(); // align info left $('#form_delivery_type_08220480155').attr('align','center') // show directions lang $('#pls_asw_08220480155').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_08220480155').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_08220480155=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220480155=='1'){ // build fc form build_foxycart_form_08220480155(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220480155').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220480155').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220480155').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220480155').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-0155" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_08220480155').val('HGR To Assist'); $('#shp_price_08220480155').val('$0.00'); $('#hand_fee_08220480155').val('$0.00'); // submit fc form $('#foxy_cart_final_form_08220480155').submit(); // clear form data $('#form_foxy_form_08220480155').html(''); // hide the modal $('#modal_08220480155').modal('hide'); clear_foxy_cart_form_08220480155(); // change add to cart button status to added add_to_cart_status('add', '08220480155'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_08220480155=localStorage.getItem("atc_international"); if(is_international_ship_set_08220480155=='1'){ // build fc form build_foxycart_form_08220480155(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08220480155').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08220480155').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08220480155').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08220480155').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-048-0155" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_08220480155').val('HGR To Assist'); $('#shp_name_08220480155').val('HGR To Assist'); $('#shp_price_08220480155').val('TBD'); $('#hand_fee_08220480155').val('TBD'); // submit fc form $('#foxy_cart_final_form_08220480155').submit(); // clear form data $('#form_foxy_form_08220480155').html(''); // hide the modal $('#modal_08220480155').modal('hide'); clear_foxy_cart_form_08220480155(); // change add to cart button status to added add_to_cart_status('add', '08220480155'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_08220480155(); $('#form_delivery_type_08220480155').show(); // hide pls_asw_ hide_me_08220480155('pls_asw_08220480155'); //// populate and show zip form // zip_code_empty_html_08220480155(); // $('#form_zip_08220480155').show(); // $('#continue_zip_08220480155 ').show(); // $('#continue_international_08220480155 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08220480155(); $('#form_email_08220480155').show(); // poplate and show zip zip_code_empty_html_08220480155(); $('#form_zip_08220480155').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08220480155(); $('#form_email_08220480155').show(); $('#continue_email_08220480155 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_08220480155(); $('#form_delivery_type_08220480155').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_08220480155(); $('#shp_type_08220480155').val('PICKUP'); $('#shp_name_08220480155').val('PICKUP') $('#shp_price_08220480155').val('$0.00'); $('#shp_zip_08220480155').val('00000'); $('#hand_fee_08220480155').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_08220480155(); $('#form_email_08220480155').show(); build_foxycart_form_08220480155(); $('#continue_rates_08220480155').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_08220480155(); $('#form_email_08220480155').show(); $('#continue_email_08220480155 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_08220480155(); $('#form_delivery_type_08220480155').show(); } }); }); function delivery_type_empty_html_08220480155(){ // change header lang $('#ModalLabel08220480155').html(''); $('#ModalLabel08220480155').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_08220480155').html(''); $('#pls_asw_08220480155').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_08220480155’).html(“); // populate form delivery_type html $(‘#form_delivery_type_08220480155’).html(`

`); } function delivery_type_set_html_08220480155(){ if(max_qty_avail_08220480155>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel08220480155’).html(”); $(‘#ModalLabel08220480155’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_08220480155’).hide(); $(‘#is_pickup_08220480155’).hide(); // align info left $(‘#form_delivery_type_08220480155’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220480155’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_08220480155’).hide(); // center the directions lang $(‘#form_delivery_type_08220480155’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_08220480155’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel08220480155’).html(”); $(‘#ModalLabel08220480155’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_08220480155’).hide(); $(‘#is_pickup_08220480155’).hide(); // align info left $(‘#form_delivery_type_08220480155’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08220480155’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_08220480155’).hide(); // center the directions lang $(‘#form_delivery_type_08220480155’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_08220480155’ ,function(){ jQuery(‘#modal_08220480155’).modal(‘hide’); jQuery(‘#modal_qty_08220480155’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_08220480155" ).click(function() { // if email valid if($('#ship_email_08220480155').val() !='' && validateEmail($('#ship_email_08220480155').val())===true){ // set email/country val atc_email_val = $('#ship_email_08220480155').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_08220480155(); // hide contine email & international buttons $('#continue_email_08220480155').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_08220480155(); $('#form_zip_08220480155').show(); $('#continue_zip_08220480155').show(); $('#continue_international_08220480155 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_08220480155(); $('#continue_rates_08220480155').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_08220480155' ,function(){ //abort rates post if exists if (typeof rates_post_08220480155 !== 'undefined') { rates_post_08220480155.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_08220480155 ').hide(); $('#continue_zip_08220480155 ').hide(); $('#continue_international_08220480155 ').hide(); // empty and show email/country form email_empty_html_08220480155(); // show contine email/iternational button $('#continue_email_08220480155').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_08220480155('form_zip_'); hide_me_08220480155('form_zip_'); // empty res form //clear_me_08220480155('form_res_type_'); hide_me_08220480155('form_res_type_'); // empty loading div //clear_me_08220480155('loading_gif_'); hide_me_08220480155('loading_gif_'); // empty rates form //clear_me_08220480155('form_api_rates_'); hide_me_08220480155('form_api_rates_'); // hide rates continue button hide_me_08220480155('continue_rates'); // empty doctype form //clear_me_08220480155('form_dock_type_'); hide_me_08220480155('form_dock_type_'); // empty foxy form //clear_me_08220480155('form_foxy_form_'); //hide_me_08220480155('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_08220480155]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_08220480155').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_08220480155(); // hide contine email / international button $('#continue_email_08220480155').hide(); $('#form_email_08220480155').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_08220480155(); $('#form_zip_08220480155').show(); $('#continue_zip_08220480155').show(); $('#continue_international_08220480155 ').show(); } } }); }); function email_empty_html_08220480155(){ // clear form email html $('#form_email_08220480155').html(“); // populate form email html $('#form_email_08220480155').html(` 1. What is your email address? `); } function email_set_html_08220480155(){ // clear form email html $('#form_email_08220480155').html(“); // populate form email html $('#form_email_08220480155').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_08220480155" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_08220480155').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_08220480155').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_08220480155(); // hide contine zip & international buttons $('#continue_zip_08220480155').hide(); $('#continue_international_08220480155').hide(); // Show empty residential form res_add_empty_html_08220480155(); $('#form_res_type_08220480155').show(); }); } }); // END click contine zip // START click international $( "#continue_international_08220480155" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_08220480155(); // hide contine zip & international buttons $('#continue_zip_08220480155').hide(); $('#continue_international_08220480155').hide(); $('#chosen_rate').html(''); $('#form_api_rates_08220480155').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_08220480155(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_08220480155’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_08220480155_99’).click(); $(‘#form_api_rates_08220480155’).show(); $(‘#continue_rates_08220480155’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_08220480155’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_08220480155 !== ‘undefined’) { rates_post_08220480155.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_08220480155(); // show contine zip/iternational button $(‘#continue_zip_08220480155’).show(); $(‘#continue_international_08220480155’).show(); hide_me_08220480155(‘form_res_type_08220480155’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_08220480155]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_08220480155(); // clear dock type cookie and local storage clear_dock_type_storage_08220480155(); // empty res form clear_me_08220480155(‘form_res_type_’); hide_me_08220480155(‘form_res_type_’); // empty loading div clear_me_08220480155(‘loading_gif_’); hide_me_08220480155(‘loading_gif_’); // empty rates form clear_me_08220480155(‘form_api_rates_’); hide_me_08220480155(‘form_api_rates_’); // hide rates continue button hide_me_08220480155(‘continue_rates’); // empty doctype form clear_me_08220480155(‘form_dock_type_’); hide_me_08220480155(‘form_dock_type_’); // empty foxy form clear_me_08220480155(‘form_foxy_form_’); hide_me_08220480155(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_08220480155]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_08220480155’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_08220480155(); // hide contine zip / international button $(‘#continue_zip_08220480155’).hide(); $(‘#continue_international_08220480155’).hide(); $(‘#continue_rates_08220480155’).hide(); // poplate and show res form res_add_empty_html_08220480155(); $(‘#form_res_type_08220480155’).show(); } }); }); function zip_code_empty_html_08220480155(){ // clear form zip html $(‘#form_zip_08220480155’).html(“); // populate form zip html $(‘#form_zip_08220480155’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_08220480155(){ // clear form zip html $(‘#form_zip_08220480155’).html(“); // populate form zip html $(‘#form_zip_08220480155’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_08220480155(yes_no){ $(‘#form_res_type_08220480155’).html(“); // populate form res html $(‘#form_res_type_08220480155’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_08220480155(yes_no){ $(‘#form_dock_type_08220480155’).html(“); // populate dock form html $(‘#form_dock_type_08220480155’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_08220480155; function get_rates_08220480155(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_08220480155=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08220480155=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0822-048-0155'; rates_atc_item_price='18.99'; rates_atc_name='Shop Equipment'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='35'; rates_atc_length='20'; rates_atc_width='12'; rates_atc_height='10'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0822/0822048/20220805131840373_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_08220480155').html(''); $('#form_api_rates_08220480155').hide(); $('#pls_asw_08220480155').hide(); $('#loading_gif_08220480155').html(''); $('#loading_gif_08220480155').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_08220480155’).show(); //send data to api rates_post_08220480155 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0822-048-0155’, rates_atc_itemname_post: ‘Shop Equipment’, rates_atc_item_sale_type_post: ’02’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_08220480155 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_08220480155’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_08220480155=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_08220480155.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_08220480155’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_08220480155.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_08220480155’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_08220480155’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220480155(); $(‘#shp_type_08220480155’).val(‘TBD’); $(‘#shp_name_08220480155’).val(‘TBD’) $(‘#shp_price_08220480155’).val(‘TBD’); $(‘#hand_fee_08220480155’).val(‘TBD’); $(‘#continue_rates_08220480155’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_08220480155’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_08220480155’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_08220480155’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08220480155(); $(‘#shp_type_08220480155’).val(‘TBD’); $(‘#shp_name_08220480155’).val(‘TBD’) $(‘#shp_price_08220480155’).val(‘TBD’); $(‘#hand_fee_08220480155’).val(‘TBD’); //rate_item_price_08220480155=’18.99′; // $(‘#price’).val((Number(rate_item_price_08220480155) + Number(rate_info_price_08220480155)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_08220480155’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_08220480155’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_08220480155’).append(”); // clear and hide the loading gif $(‘#loading_gif_08220480155’).html(”); $(‘#loading_gif_08220480155’).hide(); // show the shipping rates div $(‘#form_api_rates_08220480155’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_08220480155.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_08220480155’).html(”); $(‘#form_api_rates_08220480155’).hide(); //$(‘#pls_asw_08220480155’).show(); $(‘#loading_gif_08220480155’).html(”); $(‘#loading_gif_08220480155’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_08220480155').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_08220480155').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_08220480155').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel08220480155').html(''); //$('#ModalLabel08220480155').html(`Delivery Type`); //// change directions lang //$('#pls_asw_08220480155').html(''); //$('#pls_asw_08220480155').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_08220480155’).show(); //// show delivery type buttons //$(‘#is_ship_08220480155’).show(); //$(‘#is_pickup_08220480155’).show(); //zip_code_empty_html_08220480155(); //res_add_empty_html_08220480155(); //dock_add_empty_html_08220480155(); //delivery_type_empty_html_08220480155(); // //$(‘#loading_gif_08220480155’).html(”); //$(‘#loading_gif_08220480155’).hide(); //$(‘#form_api_rates_08220480155’).html(”); //$(‘#form_api_rates_08220480155’).hide(); hide_me_08220480155(‘form_delivery_type_08220480155’); hide_me_08220480155(‘form_zip_08220480155’); hide_me_08220480155(‘form_res_type_08220480155’); hide_me_08220480155(‘form_dock_type_08220480155’); hide_me_08220480155(‘form_api_rates_08220480155’); hide_me_08220480155(‘form_foxy_form_08220480155’); hide_me_08220480155(‘loading_gif_08220480155’); hide_me_08220480155(‘continue_rates_08220480155’); hide_me_08220480155(‘continue_zip_08220480155’); hide_me_08220480155(‘continue_international_08220480155’); clear_me_08220480155(‘form_delivery_type_08220480155’); clear_me_08220480155(‘form_zip_08220480155’); clear_me_08220480155(‘form_res_type_08220480155’); clear_me_08220480155(‘form_dock_type_08220480155’); clear_me_08220480155(‘form_api_rates_08220480155’); clear_me_08220480155(‘form_foxy_form_08220480155’); clear_me_08220480155(‘loading_gif_08220480155’); }); }); // hide id starting with function hide_me_08220480155(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_08220480155(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_08220480155(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_08220480155(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_08220480155’).modal(‘hide’); jQuery(‘#modal_08220480155’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_08220480155(){ // clear form zip html $(‘#form_qty_08220480155’).html(“); // populate form zip html $(‘#form_qty_08220480155’).html(`

How many would you like?(`+max_qty_avail_08220480155+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0822-048-0155″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0822-048-0155’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0822-048-0155’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0822-048-0155_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0822-048-0155_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0822-048-0155_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-15:hidden').length) { }else{ get_thumbs(15, 16582, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0922256/20221013065237782_L.JPG', '', '0922-256-0286') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-15:hidden').length) { }else{ get_thumbs(15, 16582, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0922256/20221013065237782_L.JPG', '', '0922-256-0286') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0922-256-0286
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
24 x 20 x 15
Weight (lb)
45
Showroom Aisle
7B3
Showroom Bay
311
Category
Shop Equipment
Location
Euclid, OH
Item Details

Shop Equipment

Euclid, OH

$18.99 $20.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_09222560286' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_09222560286(); build_foxycart_form_09222560286(); $('#shp_type_09222560286').val('PICKUP'); $('#shp_name_09222560286').val('PICKUP') $('#shp_price_09222560286').val('$0.00'); $('#hand_fee_09222560286').val('$0.00'); $('#shp_zip_09222560286').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560286(); $('#form_email_09222560286').show(); build_foxycart_form_09222560286(); $('#continue_rates_09222560286').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560286(); $('#form_email_09222560286').show(); $('#continue_email_09222560286 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_09222560286' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_09222560286(); // populate and show zip code / country form and zip code button //zip_code_empty_html_09222560286(); // $('#form_zip_09222560286').show(); // $('#continue_zip_09222560286 ').show(); // $('#continue_international_09222560286 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560286(); $('#form_email_09222560286').show(); // poplate and show zip zip_code_empty_html_09222560286(); $('#form_zip_09222560286').show(); $('#continue_zip_09222560286 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560286(); $('#form_email_09222560286').show(); $('#continue_email_09222560286 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_09222560286' ,function(){ //abort rates post if exists if (typeof rates_post_09222560286 !== 'undefined') { rates_post_09222560286.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_09222560286('form_email_09222560286'); hide_me_09222560286('form_zip_09222560286'); hide_me_09222560286('form_res_type_09222560286'); hide_me_09222560286('form_dock_type_09222560286'); hide_me_09222560286('form_api_rates_09222560286'); hide_me_09222560286('form_foxy_form_09222560286'); hide_me_09222560286('loading_gif_09222560286'); hide_me_09222560286('continue_rates_09222560286'); hide_me_09222560286('continue_zip_09222560286'); hide_me_09222560286('continue_email_09222560286'); hide_me_09222560286('continue_international_09222560286'); clear_me_09222560286('form_email_09222560286'); clear_me_09222560286('form_zip_09222560286'); clear_me_09222560286('form_res_type_09222560286'); clear_me_09222560286('form_dock_type_09222560286'); clear_me_09222560286('form_api_rates_09222560286'); clear_me_09222560286('form_foxy_form_09222560286'); clear_me_09222560286('loading_gif_09222560286'); // reset all forms delivery_type_empty_html_09222560286(); zip_code_empty_html_09222560286(); res_add_empty_html_09222560286(); dock_add_empty_html_09222560286(); email_empty_html_09222560286(); // align info left $('#form_delivery_type_09222560286').attr('align','center') // show directions lang $('#pls_asw_09222560286').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_09222560286').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_09222560286=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09222560286=='1'){ // build fc form build_foxycart_form_09222560286(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09222560286').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09222560286').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09222560286').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09222560286').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-256-0286" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_09222560286').val('HGR To Assist'); $('#shp_price_09222560286').val('$0.00'); $('#hand_fee_09222560286').val('$0.00'); // submit fc form $('#foxy_cart_final_form_09222560286').submit(); // clear form data $('#form_foxy_form_09222560286').html(''); // hide the modal $('#modal_09222560286').modal('hide'); clear_foxy_cart_form_09222560286(); // change add to cart button status to added add_to_cart_status('add', '09222560286'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_09222560286=localStorage.getItem("atc_international"); if(is_international_ship_set_09222560286=='1'){ // build fc form build_foxycart_form_09222560286(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09222560286').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09222560286').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09222560286').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09222560286').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-256-0286" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_09222560286').val('HGR To Assist'); $('#shp_name_09222560286').val('HGR To Assist'); $('#shp_price_09222560286').val('TBD'); $('#hand_fee_09222560286').val('TBD'); // submit fc form $('#foxy_cart_final_form_09222560286').submit(); // clear form data $('#form_foxy_form_09222560286').html(''); // hide the modal $('#modal_09222560286').modal('hide'); clear_foxy_cart_form_09222560286(); // change add to cart button status to added add_to_cart_status('add', '09222560286'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_09222560286(); $('#form_delivery_type_09222560286').show(); // hide pls_asw_ hide_me_09222560286('pls_asw_09222560286'); //// populate and show zip form // zip_code_empty_html_09222560286(); // $('#form_zip_09222560286').show(); // $('#continue_zip_09222560286 ').show(); // $('#continue_international_09222560286 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560286(); $('#form_email_09222560286').show(); // poplate and show zip zip_code_empty_html_09222560286(); $('#form_zip_09222560286').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560286(); $('#form_email_09222560286').show(); $('#continue_email_09222560286 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_09222560286(); $('#form_delivery_type_09222560286').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_09222560286(); $('#shp_type_09222560286').val('PICKUP'); $('#shp_name_09222560286').val('PICKUP') $('#shp_price_09222560286').val('$0.00'); $('#shp_zip_09222560286').val('00000'); $('#hand_fee_09222560286').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_09222560286(); $('#form_email_09222560286').show(); build_foxycart_form_09222560286(); $('#continue_rates_09222560286').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_09222560286(); $('#form_email_09222560286').show(); $('#continue_email_09222560286 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_09222560286(); $('#form_delivery_type_09222560286').show(); } }); }); function delivery_type_empty_html_09222560286(){ // change header lang $('#ModalLabel09222560286').html(''); $('#ModalLabel09222560286').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_09222560286').html(''); $('#pls_asw_09222560286').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_09222560286’).html(“); // populate form delivery_type html $(‘#form_delivery_type_09222560286’).html(`

`); } function delivery_type_set_html_09222560286(){ if(max_qty_avail_09222560286>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel09222560286’).html(”); $(‘#ModalLabel09222560286’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_09222560286’).hide(); $(‘#is_pickup_09222560286’).hide(); // align info left $(‘#form_delivery_type_09222560286’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09222560286’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_09222560286’).hide(); // center the directions lang $(‘#form_delivery_type_09222560286’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_09222560286’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel09222560286’).html(”); $(‘#ModalLabel09222560286’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_09222560286’).hide(); $(‘#is_pickup_09222560286’).hide(); // align info left $(‘#form_delivery_type_09222560286’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09222560286’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_09222560286’).hide(); // center the directions lang $(‘#form_delivery_type_09222560286’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_09222560286’ ,function(){ jQuery(‘#modal_09222560286’).modal(‘hide’); jQuery(‘#modal_qty_09222560286’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_09222560286" ).click(function() { // if email valid if($('#ship_email_09222560286').val() !='' && validateEmail($('#ship_email_09222560286').val())===true){ // set email/country val atc_email_val = $('#ship_email_09222560286').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_09222560286(); // hide contine email & international buttons $('#continue_email_09222560286').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_09222560286(); $('#form_zip_09222560286').show(); $('#continue_zip_09222560286').show(); $('#continue_international_09222560286 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_09222560286(); $('#continue_rates_09222560286').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_09222560286' ,function(){ //abort rates post if exists if (typeof rates_post_09222560286 !== 'undefined') { rates_post_09222560286.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_09222560286 ').hide(); $('#continue_zip_09222560286 ').hide(); $('#continue_international_09222560286 ').hide(); // empty and show email/country form email_empty_html_09222560286(); // show contine email/iternational button $('#continue_email_09222560286').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_09222560286('form_zip_'); hide_me_09222560286('form_zip_'); // empty res form //clear_me_09222560286('form_res_type_'); hide_me_09222560286('form_res_type_'); // empty loading div //clear_me_09222560286('loading_gif_'); hide_me_09222560286('loading_gif_'); // empty rates form //clear_me_09222560286('form_api_rates_'); hide_me_09222560286('form_api_rates_'); // hide rates continue button hide_me_09222560286('continue_rates'); // empty doctype form //clear_me_09222560286('form_dock_type_'); hide_me_09222560286('form_dock_type_'); // empty foxy form //clear_me_09222560286('form_foxy_form_'); //hide_me_09222560286('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_09222560286]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_09222560286').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_09222560286(); // hide contine email / international button $('#continue_email_09222560286').hide(); $('#form_email_09222560286').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_09222560286(); $('#form_zip_09222560286').show(); $('#continue_zip_09222560286').show(); $('#continue_international_09222560286 ').show(); } } }); }); function email_empty_html_09222560286(){ // clear form email html $('#form_email_09222560286').html(“); // populate form email html $('#form_email_09222560286').html(` 1. What is your email address? `); } function email_set_html_09222560286(){ // clear form email html $('#form_email_09222560286').html(“); // populate form email html $('#form_email_09222560286').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_09222560286" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_09222560286').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_09222560286').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_09222560286(); // hide contine zip & international buttons $('#continue_zip_09222560286').hide(); $('#continue_international_09222560286').hide(); // Show empty residential form res_add_empty_html_09222560286(); $('#form_res_type_09222560286').show(); }); } }); // END click contine zip // START click international $( "#continue_international_09222560286" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_09222560286(); // hide contine zip & international buttons $('#continue_zip_09222560286').hide(); $('#continue_international_09222560286').hide(); $('#chosen_rate').html(''); $('#form_api_rates_09222560286').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_09222560286(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_09222560286’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_09222560286_99’).click(); $(‘#form_api_rates_09222560286’).show(); $(‘#continue_rates_09222560286’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_09222560286’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_09222560286 !== ‘undefined’) { rates_post_09222560286.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_09222560286(); // show contine zip/iternational button $(‘#continue_zip_09222560286’).show(); $(‘#continue_international_09222560286’).show(); hide_me_09222560286(‘form_res_type_09222560286’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_09222560286]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_09222560286(); // clear dock type cookie and local storage clear_dock_type_storage_09222560286(); // empty res form clear_me_09222560286(‘form_res_type_’); hide_me_09222560286(‘form_res_type_’); // empty loading div clear_me_09222560286(‘loading_gif_’); hide_me_09222560286(‘loading_gif_’); // empty rates form clear_me_09222560286(‘form_api_rates_’); hide_me_09222560286(‘form_api_rates_’); // hide rates continue button hide_me_09222560286(‘continue_rates’); // empty doctype form clear_me_09222560286(‘form_dock_type_’); hide_me_09222560286(‘form_dock_type_’); // empty foxy form clear_me_09222560286(‘form_foxy_form_’); hide_me_09222560286(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_09222560286]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_09222560286’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_09222560286(); // hide contine zip / international button $(‘#continue_zip_09222560286’).hide(); $(‘#continue_international_09222560286’).hide(); $(‘#continue_rates_09222560286’).hide(); // poplate and show res form res_add_empty_html_09222560286(); $(‘#form_res_type_09222560286’).show(); } }); }); function zip_code_empty_html_09222560286(){ // clear form zip html $(‘#form_zip_09222560286’).html(“); // populate form zip html $(‘#form_zip_09222560286’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_09222560286(){ // clear form zip html $(‘#form_zip_09222560286’).html(“); // populate form zip html $(‘#form_zip_09222560286’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_09222560286(yes_no){ $(‘#form_res_type_09222560286’).html(“); // populate form res html $(‘#form_res_type_09222560286’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_09222560286(yes_no){ $(‘#form_dock_type_09222560286’).html(“); // populate dock form html $(‘#form_dock_type_09222560286’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_09222560286; function get_rates_09222560286(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_09222560286=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09222560286=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0922-256-0286'; rates_atc_item_price='18.99'; rates_atc_name='Shop Equipment'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='45'; rates_atc_length='24'; rates_atc_width='20'; rates_atc_height='15'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/1022/0922256/20221013065237608_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_09222560286').html(''); $('#form_api_rates_09222560286').hide(); $('#pls_asw_09222560286').hide(); $('#loading_gif_09222560286').html(''); $('#loading_gif_09222560286').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_09222560286’).show(); //send data to api rates_post_09222560286 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0922-256-0286’, rates_atc_itemname_post: ‘Shop Equipment’, rates_atc_item_sale_type_post: ’02’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_09222560286 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_09222560286’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_09222560286=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_09222560286.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_09222560286’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_09222560286.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_09222560286’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_09222560286’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09222560286(); $(‘#shp_type_09222560286’).val(‘TBD’); $(‘#shp_name_09222560286’).val(‘TBD’) $(‘#shp_price_09222560286’).val(‘TBD’); $(‘#hand_fee_09222560286’).val(‘TBD’); $(‘#continue_rates_09222560286’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_09222560286’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_09222560286’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_09222560286’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09222560286(); $(‘#shp_type_09222560286’).val(‘TBD’); $(‘#shp_name_09222560286’).val(‘TBD’) $(‘#shp_price_09222560286’).val(‘TBD’); $(‘#hand_fee_09222560286’).val(‘TBD’); //rate_item_price_09222560286=’18.99′; // $(‘#price’).val((Number(rate_item_price_09222560286) + Number(rate_info_price_09222560286)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_09222560286’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_09222560286’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_09222560286’).append(”); // clear and hide the loading gif $(‘#loading_gif_09222560286’).html(”); $(‘#loading_gif_09222560286’).hide(); // show the shipping rates div $(‘#form_api_rates_09222560286’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_09222560286.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_09222560286’).html(”); $(‘#form_api_rates_09222560286’).hide(); //$(‘#pls_asw_09222560286’).show(); $(‘#loading_gif_09222560286’).html(”); $(‘#loading_gif_09222560286’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_09222560286').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_09222560286').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_09222560286').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel09222560286').html(''); //$('#ModalLabel09222560286').html(`Delivery Type`); //// change directions lang //$('#pls_asw_09222560286').html(''); //$('#pls_asw_09222560286').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_09222560286’).show(); //// show delivery type buttons //$(‘#is_ship_09222560286’).show(); //$(‘#is_pickup_09222560286’).show(); //zip_code_empty_html_09222560286(); //res_add_empty_html_09222560286(); //dock_add_empty_html_09222560286(); //delivery_type_empty_html_09222560286(); // //$(‘#loading_gif_09222560286’).html(”); //$(‘#loading_gif_09222560286’).hide(); //$(‘#form_api_rates_09222560286’).html(”); //$(‘#form_api_rates_09222560286’).hide(); hide_me_09222560286(‘form_delivery_type_09222560286’); hide_me_09222560286(‘form_zip_09222560286’); hide_me_09222560286(‘form_res_type_09222560286’); hide_me_09222560286(‘form_dock_type_09222560286’); hide_me_09222560286(‘form_api_rates_09222560286’); hide_me_09222560286(‘form_foxy_form_09222560286’); hide_me_09222560286(‘loading_gif_09222560286’); hide_me_09222560286(‘continue_rates_09222560286’); hide_me_09222560286(‘continue_zip_09222560286’); hide_me_09222560286(‘continue_international_09222560286’); clear_me_09222560286(‘form_delivery_type_09222560286’); clear_me_09222560286(‘form_zip_09222560286’); clear_me_09222560286(‘form_res_type_09222560286’); clear_me_09222560286(‘form_dock_type_09222560286’); clear_me_09222560286(‘form_api_rates_09222560286’); clear_me_09222560286(‘form_foxy_form_09222560286’); clear_me_09222560286(‘loading_gif_09222560286’); }); }); // hide id starting with function hide_me_09222560286(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_09222560286(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_09222560286(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_09222560286(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_09222560286’).modal(‘hide’); jQuery(‘#modal_09222560286’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_09222560286(){ // clear form zip html $(‘#form_qty_09222560286’).html(“); // populate form zip html $(‘#form_qty_09222560286’).html(`

How many would you like?(`+max_qty_avail_09222560286+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0922-256-0286″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0922-256-0286’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0922-256-0286’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0922-256-0286_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0922-256-0286_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0922-256-0286_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-16:hidden').length) { }else{ get_thumbs(16, 17642, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0822248/20221003092000310_L.JPG', '', '0822-248-0164') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-16:hidden').length) { }else{ get_thumbs(16, 17642, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0822248/20221003092000310_L.JPG', '', '0822-248-0164') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0822-248-0164
Quantity
1
Manufacturer
Shop Vac
Model Number
Serial Number Make Year
Capacity
6.5
Electrical
Dimensions L x W x H (inches)
31 x 51 x 35
Weight (lb)
25
Showroom Aisle
01B
Showroom Bay
2500
Category
Shop Equipment
Location
Euclid, OH
Item Details

Shop Vac

Shop Vacuum

Euclid, OH

$18.99 $20.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_08222480164' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_08222480164(); build_foxycart_form_08222480164(); $('#shp_type_08222480164').val('PICKUP'); $('#shp_name_08222480164').val('PICKUP') $('#shp_price_08222480164').val('$0.00'); $('#hand_fee_08222480164').val('$0.00'); $('#shp_zip_08222480164').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08222480164(); $('#form_email_08222480164').show(); build_foxycart_form_08222480164(); $('#continue_rates_08222480164').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08222480164(); $('#form_email_08222480164').show(); $('#continue_email_08222480164 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_08222480164' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_08222480164(); // populate and show zip code / country form and zip code button //zip_code_empty_html_08222480164(); // $('#form_zip_08222480164').show(); // $('#continue_zip_08222480164 ').show(); // $('#continue_international_08222480164 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08222480164(); $('#form_email_08222480164').show(); // poplate and show zip zip_code_empty_html_08222480164(); $('#form_zip_08222480164').show(); $('#continue_zip_08222480164 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08222480164(); $('#form_email_08222480164').show(); $('#continue_email_08222480164 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_08222480164' ,function(){ //abort rates post if exists if (typeof rates_post_08222480164 !== 'undefined') { rates_post_08222480164.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_08222480164('form_email_08222480164'); hide_me_08222480164('form_zip_08222480164'); hide_me_08222480164('form_res_type_08222480164'); hide_me_08222480164('form_dock_type_08222480164'); hide_me_08222480164('form_api_rates_08222480164'); hide_me_08222480164('form_foxy_form_08222480164'); hide_me_08222480164('loading_gif_08222480164'); hide_me_08222480164('continue_rates_08222480164'); hide_me_08222480164('continue_zip_08222480164'); hide_me_08222480164('continue_email_08222480164'); hide_me_08222480164('continue_international_08222480164'); clear_me_08222480164('form_email_08222480164'); clear_me_08222480164('form_zip_08222480164'); clear_me_08222480164('form_res_type_08222480164'); clear_me_08222480164('form_dock_type_08222480164'); clear_me_08222480164('form_api_rates_08222480164'); clear_me_08222480164('form_foxy_form_08222480164'); clear_me_08222480164('loading_gif_08222480164'); // reset all forms delivery_type_empty_html_08222480164(); zip_code_empty_html_08222480164(); res_add_empty_html_08222480164(); dock_add_empty_html_08222480164(); email_empty_html_08222480164(); // align info left $('#form_delivery_type_08222480164').attr('align','center') // show directions lang $('#pls_asw_08222480164').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_08222480164').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_08222480164=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08222480164=='1'){ // build fc form build_foxycart_form_08222480164(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08222480164').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08222480164').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08222480164').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08222480164').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-248-0164" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_08222480164').val('HGR To Assist'); $('#shp_price_08222480164').val('$0.00'); $('#hand_fee_08222480164').val('$0.00'); // submit fc form $('#foxy_cart_final_form_08222480164').submit(); // clear form data $('#form_foxy_form_08222480164').html(''); // hide the modal $('#modal_08222480164').modal('hide'); clear_foxy_cart_form_08222480164(); // change add to cart button status to added add_to_cart_status('add', '08222480164'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_08222480164=localStorage.getItem("atc_international"); if(is_international_ship_set_08222480164=='1'){ // build fc form build_foxycart_form_08222480164(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_08222480164').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_08222480164').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_08222480164').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_08222480164').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0822-248-0164" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_08222480164').val('HGR To Assist'); $('#shp_name_08222480164').val('HGR To Assist'); $('#shp_price_08222480164').val('TBD'); $('#hand_fee_08222480164').val('TBD'); // submit fc form $('#foxy_cart_final_form_08222480164').submit(); // clear form data $('#form_foxy_form_08222480164').html(''); // hide the modal $('#modal_08222480164').modal('hide'); clear_foxy_cart_form_08222480164(); // change add to cart button status to added add_to_cart_status('add', '08222480164'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_08222480164(); $('#form_delivery_type_08222480164').show(); // hide pls_asw_ hide_me_08222480164('pls_asw_08222480164'); //// populate and show zip form // zip_code_empty_html_08222480164(); // $('#form_zip_08222480164').show(); // $('#continue_zip_08222480164 ').show(); // $('#continue_international_08222480164 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_08222480164(); $('#form_email_08222480164').show(); // poplate and show zip zip_code_empty_html_08222480164(); $('#form_zip_08222480164').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_08222480164(); $('#form_email_08222480164').show(); $('#continue_email_08222480164 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_08222480164(); $('#form_delivery_type_08222480164').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_08222480164(); $('#shp_type_08222480164').val('PICKUP'); $('#shp_name_08222480164').val('PICKUP') $('#shp_price_08222480164').val('$0.00'); $('#shp_zip_08222480164').val('00000'); $('#hand_fee_08222480164').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_08222480164(); $('#form_email_08222480164').show(); build_foxycart_form_08222480164(); $('#continue_rates_08222480164').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_08222480164(); $('#form_email_08222480164').show(); $('#continue_email_08222480164 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_08222480164(); $('#form_delivery_type_08222480164').show(); } }); }); function delivery_type_empty_html_08222480164(){ // change header lang $('#ModalLabel08222480164').html(''); $('#ModalLabel08222480164').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_08222480164').html(''); $('#pls_asw_08222480164').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_08222480164’).html(“); // populate form delivery_type html $(‘#form_delivery_type_08222480164’).html(`

`); } function delivery_type_set_html_08222480164(){ if(max_qty_avail_08222480164>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel08222480164’).html(”); $(‘#ModalLabel08222480164’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_08222480164’).hide(); $(‘#is_pickup_08222480164’).hide(); // align info left $(‘#form_delivery_type_08222480164’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08222480164’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_08222480164’).hide(); // center the directions lang $(‘#form_delivery_type_08222480164’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_08222480164’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel08222480164’).html(”); $(‘#ModalLabel08222480164’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_08222480164’).hide(); $(‘#is_pickup_08222480164’).hide(); // align info left $(‘#form_delivery_type_08222480164’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_08222480164’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_08222480164’).hide(); // center the directions lang $(‘#form_delivery_type_08222480164’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_08222480164’ ,function(){ jQuery(‘#modal_08222480164’).modal(‘hide’); jQuery(‘#modal_qty_08222480164’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_08222480164" ).click(function() { // if email valid if($('#ship_email_08222480164').val() !='' && validateEmail($('#ship_email_08222480164').val())===true){ // set email/country val atc_email_val = $('#ship_email_08222480164').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_08222480164(); // hide contine email & international buttons $('#continue_email_08222480164').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_08222480164(); $('#form_zip_08222480164').show(); $('#continue_zip_08222480164').show(); $('#continue_international_08222480164 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_08222480164(); $('#continue_rates_08222480164').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_08222480164' ,function(){ //abort rates post if exists if (typeof rates_post_08222480164 !== 'undefined') { rates_post_08222480164.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_08222480164 ').hide(); $('#continue_zip_08222480164 ').hide(); $('#continue_international_08222480164 ').hide(); // empty and show email/country form email_empty_html_08222480164(); // show contine email/iternational button $('#continue_email_08222480164').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_08222480164('form_zip_'); hide_me_08222480164('form_zip_'); // empty res form //clear_me_08222480164('form_res_type_'); hide_me_08222480164('form_res_type_'); // empty loading div //clear_me_08222480164('loading_gif_'); hide_me_08222480164('loading_gif_'); // empty rates form //clear_me_08222480164('form_api_rates_'); hide_me_08222480164('form_api_rates_'); // hide rates continue button hide_me_08222480164('continue_rates'); // empty doctype form //clear_me_08222480164('form_dock_type_'); hide_me_08222480164('form_dock_type_'); // empty foxy form //clear_me_08222480164('form_foxy_form_'); //hide_me_08222480164('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_08222480164]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_08222480164').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_08222480164(); // hide contine email / international button $('#continue_email_08222480164').hide(); $('#form_email_08222480164').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_08222480164(); $('#form_zip_08222480164').show(); $('#continue_zip_08222480164').show(); $('#continue_international_08222480164 ').show(); } } }); }); function email_empty_html_08222480164(){ // clear form email html $('#form_email_08222480164').html(“); // populate form email html $('#form_email_08222480164').html(` 1. What is your email address? `); } function email_set_html_08222480164(){ // clear form email html $('#form_email_08222480164').html(“); // populate form email html $('#form_email_08222480164').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_08222480164" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_08222480164').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_08222480164').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_08222480164(); // hide contine zip & international buttons $('#continue_zip_08222480164').hide(); $('#continue_international_08222480164').hide(); // Show empty residential form res_add_empty_html_08222480164(); $('#form_res_type_08222480164').show(); }); } }); // END click contine zip // START click international $( "#continue_international_08222480164" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_08222480164(); // hide contine zip & international buttons $('#continue_zip_08222480164').hide(); $('#continue_international_08222480164').hide(); $('#chosen_rate').html(''); $('#form_api_rates_08222480164').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_08222480164(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_08222480164’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_08222480164_99’).click(); $(‘#form_api_rates_08222480164’).show(); $(‘#continue_rates_08222480164’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_08222480164’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_08222480164 !== ‘undefined’) { rates_post_08222480164.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_08222480164(); // show contine zip/iternational button $(‘#continue_zip_08222480164’).show(); $(‘#continue_international_08222480164’).show(); hide_me_08222480164(‘form_res_type_08222480164’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_08222480164]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_08222480164(); // clear dock type cookie and local storage clear_dock_type_storage_08222480164(); // empty res form clear_me_08222480164(‘form_res_type_’); hide_me_08222480164(‘form_res_type_’); // empty loading div clear_me_08222480164(‘loading_gif_’); hide_me_08222480164(‘loading_gif_’); // empty rates form clear_me_08222480164(‘form_api_rates_’); hide_me_08222480164(‘form_api_rates_’); // hide rates continue button hide_me_08222480164(‘continue_rates’); // empty doctype form clear_me_08222480164(‘form_dock_type_’); hide_me_08222480164(‘form_dock_type_’); // empty foxy form clear_me_08222480164(‘form_foxy_form_’); hide_me_08222480164(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_08222480164]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_08222480164’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_08222480164(); // hide contine zip / international button $(‘#continue_zip_08222480164’).hide(); $(‘#continue_international_08222480164’).hide(); $(‘#continue_rates_08222480164’).hide(); // poplate and show res form res_add_empty_html_08222480164(); $(‘#form_res_type_08222480164’).show(); } }); }); function zip_code_empty_html_08222480164(){ // clear form zip html $(‘#form_zip_08222480164’).html(“); // populate form zip html $(‘#form_zip_08222480164’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_08222480164(){ // clear form zip html $(‘#form_zip_08222480164’).html(“); // populate form zip html $(‘#form_zip_08222480164’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_08222480164(yes_no){ $(‘#form_res_type_08222480164’).html(“); // populate form res html $(‘#form_res_type_08222480164’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_08222480164(yes_no){ $(‘#form_dock_type_08222480164’).html(“); // populate dock form html $(‘#form_dock_type_08222480164’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_08222480164; function get_rates_08222480164(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_08222480164=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_08222480164=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0822-248-0164'; rates_atc_item_price='18.99'; rates_atc_name='Shop Vacuum'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='25'; rates_atc_length='31'; rates_atc_width='51'; rates_atc_height='35'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/1022/0822248/20221003092000145_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_08222480164').html(''); $('#form_api_rates_08222480164').hide(); $('#pls_asw_08222480164').hide(); $('#loading_gif_08222480164').html(''); $('#loading_gif_08222480164').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_08222480164’).show(); //send data to api rates_post_08222480164 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0822-248-0164’, rates_atc_itemname_post: ‘Shop Vacuum’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_08222480164 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_08222480164’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_08222480164=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_08222480164.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_08222480164’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_08222480164.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_08222480164’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_08222480164’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08222480164(); $(‘#shp_type_08222480164’).val(‘TBD’); $(‘#shp_name_08222480164’).val(‘TBD’) $(‘#shp_price_08222480164’).val(‘TBD’); $(‘#hand_fee_08222480164’).val(‘TBD’); $(‘#continue_rates_08222480164’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_08222480164’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_08222480164’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_08222480164’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_08222480164(); $(‘#shp_type_08222480164’).val(‘TBD’); $(‘#shp_name_08222480164’).val(‘TBD’) $(‘#shp_price_08222480164’).val(‘TBD’); $(‘#hand_fee_08222480164’).val(‘TBD’); //rate_item_price_08222480164=’18.99′; // $(‘#price’).val((Number(rate_item_price_08222480164) + Number(rate_info_price_08222480164)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_08222480164’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_08222480164’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_08222480164’).append(”); // clear and hide the loading gif $(‘#loading_gif_08222480164’).html(”); $(‘#loading_gif_08222480164’).hide(); // show the shipping rates div $(‘#form_api_rates_08222480164’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_08222480164.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_08222480164’).html(”); $(‘#form_api_rates_08222480164’).hide(); //$(‘#pls_asw_08222480164’).show(); $(‘#loading_gif_08222480164’).html(”); $(‘#loading_gif_08222480164’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_08222480164').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_08222480164').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_08222480164').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel08222480164').html(''); //$('#ModalLabel08222480164').html(`Delivery Type`); //// change directions lang //$('#pls_asw_08222480164').html(''); //$('#pls_asw_08222480164').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_08222480164’).show(); //// show delivery type buttons //$(‘#is_ship_08222480164’).show(); //$(‘#is_pickup_08222480164’).show(); //zip_code_empty_html_08222480164(); //res_add_empty_html_08222480164(); //dock_add_empty_html_08222480164(); //delivery_type_empty_html_08222480164(); // //$(‘#loading_gif_08222480164’).html(”); //$(‘#loading_gif_08222480164’).hide(); //$(‘#form_api_rates_08222480164’).html(”); //$(‘#form_api_rates_08222480164’).hide(); hide_me_08222480164(‘form_delivery_type_08222480164’); hide_me_08222480164(‘form_zip_08222480164’); hide_me_08222480164(‘form_res_type_08222480164’); hide_me_08222480164(‘form_dock_type_08222480164’); hide_me_08222480164(‘form_api_rates_08222480164’); hide_me_08222480164(‘form_foxy_form_08222480164’); hide_me_08222480164(‘loading_gif_08222480164’); hide_me_08222480164(‘continue_rates_08222480164’); hide_me_08222480164(‘continue_zip_08222480164’); hide_me_08222480164(‘continue_international_08222480164’); clear_me_08222480164(‘form_delivery_type_08222480164’); clear_me_08222480164(‘form_zip_08222480164’); clear_me_08222480164(‘form_res_type_08222480164’); clear_me_08222480164(‘form_dock_type_08222480164’); clear_me_08222480164(‘form_api_rates_08222480164’); clear_me_08222480164(‘form_foxy_form_08222480164’); clear_me_08222480164(‘loading_gif_08222480164’); }); }); // hide id starting with function hide_me_08222480164(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_08222480164(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_08222480164(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_08222480164(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_08222480164’).modal(‘hide’); jQuery(‘#modal_08222480164’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_08222480164(){ // clear form zip html $(‘#form_qty_08222480164’).html(“); // populate form zip html $(‘#form_qty_08222480164’).html(`

How many would you like?(`+max_qty_avail_08222480164+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0822-248-0164” }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0822-248-0164’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Shop Equipment’,’brand’: ‘Shop Vac’, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0822-248-0164’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0822-248-0164_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0822-248-0164_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0822-248-0164_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-17:hidden').length) { }else{ get_thumbs(17, 16880, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0922256/20221011142237234_L.JPG', '', '0922-256-0252') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-17:hidden').length) { }else{ get_thumbs(17, 16880, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0922256/20221011142237234_L.JPG', '', '0922-256-0252') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0922-256-0252
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
24 x 20 x 17
Weight (lb)
38
Showroom Aisle
04A
Showroom Bay
3700
Category
Electrical
Location
Euclid, OH
Item Details

Shop Equipment

Euclid, OH

$18.99 $19.99 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_09222560252' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_09222560252(); build_foxycart_form_09222560252(); $('#shp_type_09222560252').val('PICKUP'); $('#shp_name_09222560252').val('PICKUP') $('#shp_price_09222560252').val('$0.00'); $('#hand_fee_09222560252').val('$0.00'); $('#shp_zip_09222560252').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560252(); $('#form_email_09222560252').show(); build_foxycart_form_09222560252(); $('#continue_rates_09222560252').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560252(); $('#form_email_09222560252').show(); $('#continue_email_09222560252 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_09222560252' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_09222560252(); // populate and show zip code / country form and zip code button //zip_code_empty_html_09222560252(); // $('#form_zip_09222560252').show(); // $('#continue_zip_09222560252 ').show(); // $('#continue_international_09222560252 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560252(); $('#form_email_09222560252').show(); // poplate and show zip zip_code_empty_html_09222560252(); $('#form_zip_09222560252').show(); $('#continue_zip_09222560252 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560252(); $('#form_email_09222560252').show(); $('#continue_email_09222560252 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_09222560252' ,function(){ //abort rates post if exists if (typeof rates_post_09222560252 !== 'undefined') { rates_post_09222560252.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_09222560252('form_email_09222560252'); hide_me_09222560252('form_zip_09222560252'); hide_me_09222560252('form_res_type_09222560252'); hide_me_09222560252('form_dock_type_09222560252'); hide_me_09222560252('form_api_rates_09222560252'); hide_me_09222560252('form_foxy_form_09222560252'); hide_me_09222560252('loading_gif_09222560252'); hide_me_09222560252('continue_rates_09222560252'); hide_me_09222560252('continue_zip_09222560252'); hide_me_09222560252('continue_email_09222560252'); hide_me_09222560252('continue_international_09222560252'); clear_me_09222560252('form_email_09222560252'); clear_me_09222560252('form_zip_09222560252'); clear_me_09222560252('form_res_type_09222560252'); clear_me_09222560252('form_dock_type_09222560252'); clear_me_09222560252('form_api_rates_09222560252'); clear_me_09222560252('form_foxy_form_09222560252'); clear_me_09222560252('loading_gif_09222560252'); // reset all forms delivery_type_empty_html_09222560252(); zip_code_empty_html_09222560252(); res_add_empty_html_09222560252(); dock_add_empty_html_09222560252(); email_empty_html_09222560252(); // align info left $('#form_delivery_type_09222560252').attr('align','center') // show directions lang $('#pls_asw_09222560252').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_09222560252').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_09222560252=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09222560252=='1'){ // build fc form build_foxycart_form_09222560252(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09222560252').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09222560252').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09222560252').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09222560252').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-256-0252" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_09222560252').val('HGR To Assist'); $('#shp_price_09222560252').val('$0.00'); $('#hand_fee_09222560252').val('$0.00'); // submit fc form $('#foxy_cart_final_form_09222560252').submit(); // clear form data $('#form_foxy_form_09222560252').html(''); // hide the modal $('#modal_09222560252').modal('hide'); clear_foxy_cart_form_09222560252(); // change add to cart button status to added add_to_cart_status('add', '09222560252'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_09222560252=localStorage.getItem("atc_international"); if(is_international_ship_set_09222560252=='1'){ // build fc form build_foxycart_form_09222560252(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_09222560252').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_09222560252').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_09222560252').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_09222560252').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0922-256-0252" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_09222560252').val('HGR To Assist'); $('#shp_name_09222560252').val('HGR To Assist'); $('#shp_price_09222560252').val('TBD'); $('#hand_fee_09222560252').val('TBD'); // submit fc form $('#foxy_cart_final_form_09222560252').submit(); // clear form data $('#form_foxy_form_09222560252').html(''); // hide the modal $('#modal_09222560252').modal('hide'); clear_foxy_cart_form_09222560252(); // change add to cart button status to added add_to_cart_status('add', '09222560252'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_09222560252(); $('#form_delivery_type_09222560252').show(); // hide pls_asw_ hide_me_09222560252('pls_asw_09222560252'); //// populate and show zip form // zip_code_empty_html_09222560252(); // $('#form_zip_09222560252').show(); // $('#continue_zip_09222560252 ').show(); // $('#continue_international_09222560252 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_09222560252(); $('#form_email_09222560252').show(); // poplate and show zip zip_code_empty_html_09222560252(); $('#form_zip_09222560252').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_09222560252(); $('#form_email_09222560252').show(); $('#continue_email_09222560252 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_09222560252(); $('#form_delivery_type_09222560252').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_09222560252(); $('#shp_type_09222560252').val('PICKUP'); $('#shp_name_09222560252').val('PICKUP') $('#shp_price_09222560252').val('$0.00'); $('#shp_zip_09222560252').val('00000'); $('#hand_fee_09222560252').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_09222560252(); $('#form_email_09222560252').show(); build_foxycart_form_09222560252(); $('#continue_rates_09222560252').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_09222560252(); $('#form_email_09222560252').show(); $('#continue_email_09222560252 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_09222560252(); $('#form_delivery_type_09222560252').show(); } }); }); function delivery_type_empty_html_09222560252(){ // change header lang $('#ModalLabel09222560252').html(''); $('#ModalLabel09222560252').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_09222560252').html(''); $('#pls_asw_09222560252').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_09222560252’).html(“); // populate form delivery_type html $(‘#form_delivery_type_09222560252’).html(`

`); } function delivery_type_set_html_09222560252(){ if(max_qty_avail_09222560252>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel09222560252’).html(”); $(‘#ModalLabel09222560252’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_09222560252’).hide(); $(‘#is_pickup_09222560252’).hide(); // align info left $(‘#form_delivery_type_09222560252’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09222560252’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_09222560252’).hide(); // center the directions lang $(‘#form_delivery_type_09222560252’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_09222560252’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel09222560252’).html(”); $(‘#ModalLabel09222560252’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_09222560252’).hide(); $(‘#is_pickup_09222560252’).hide(); // align info left $(‘#form_delivery_type_09222560252’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_09222560252’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_09222560252’).hide(); // center the directions lang $(‘#form_delivery_type_09222560252’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_09222560252’ ,function(){ jQuery(‘#modal_09222560252’).modal(‘hide’); jQuery(‘#modal_qty_09222560252’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_09222560252" ).click(function() { // if email valid if($('#ship_email_09222560252').val() !='' && validateEmail($('#ship_email_09222560252').val())===true){ // set email/country val atc_email_val = $('#ship_email_09222560252').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_09222560252(); // hide contine email & international buttons $('#continue_email_09222560252').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_09222560252(); $('#form_zip_09222560252').show(); $('#continue_zip_09222560252').show(); $('#continue_international_09222560252 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_09222560252(); $('#continue_rates_09222560252').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_09222560252' ,function(){ //abort rates post if exists if (typeof rates_post_09222560252 !== 'undefined') { rates_post_09222560252.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_09222560252 ').hide(); $('#continue_zip_09222560252 ').hide(); $('#continue_international_09222560252 ').hide(); // empty and show email/country form email_empty_html_09222560252(); // show contine email/iternational button $('#continue_email_09222560252').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_09222560252('form_zip_'); hide_me_09222560252('form_zip_'); // empty res form //clear_me_09222560252('form_res_type_'); hide_me_09222560252('form_res_type_'); // empty loading div //clear_me_09222560252('loading_gif_'); hide_me_09222560252('loading_gif_'); // empty rates form //clear_me_09222560252('form_api_rates_'); hide_me_09222560252('form_api_rates_'); // hide rates continue button hide_me_09222560252('continue_rates'); // empty doctype form //clear_me_09222560252('form_dock_type_'); hide_me_09222560252('form_dock_type_'); // empty foxy form //clear_me_09222560252('form_foxy_form_'); //hide_me_09222560252('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_09222560252]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_09222560252').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_09222560252(); // hide contine email / international button $('#continue_email_09222560252').hide(); $('#form_email_09222560252').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_09222560252(); $('#form_zip_09222560252').show(); $('#continue_zip_09222560252').show(); $('#continue_international_09222560252 ').show(); } } }); }); function email_empty_html_09222560252(){ // clear form email html $('#form_email_09222560252').html(“); // populate form email html $('#form_email_09222560252').html(` 1. What is your email address? `); } function email_set_html_09222560252(){ // clear form email html $('#form_email_09222560252').html(“); // populate form email html $('#form_email_09222560252').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_09222560252" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_09222560252').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_09222560252').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_09222560252(); // hide contine zip & international buttons $('#continue_zip_09222560252').hide(); $('#continue_international_09222560252').hide(); // Show empty residential form res_add_empty_html_09222560252(); $('#form_res_type_09222560252').show(); }); } }); // END click contine zip // START click international $( "#continue_international_09222560252" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_09222560252(); // hide contine zip & international buttons $('#continue_zip_09222560252').hide(); $('#continue_international_09222560252').hide(); $('#chosen_rate').html(''); $('#form_api_rates_09222560252').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_09222560252(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_09222560252’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_09222560252_99’).click(); $(‘#form_api_rates_09222560252’).show(); $(‘#continue_rates_09222560252’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_09222560252’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_09222560252 !== ‘undefined’) { rates_post_09222560252.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_09222560252(); // show contine zip/iternational button $(‘#continue_zip_09222560252’).show(); $(‘#continue_international_09222560252’).show(); hide_me_09222560252(‘form_res_type_09222560252’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_09222560252]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_09222560252(); // clear dock type cookie and local storage clear_dock_type_storage_09222560252(); // empty res form clear_me_09222560252(‘form_res_type_’); hide_me_09222560252(‘form_res_type_’); // empty loading div clear_me_09222560252(‘loading_gif_’); hide_me_09222560252(‘loading_gif_’); // empty rates form clear_me_09222560252(‘form_api_rates_’); hide_me_09222560252(‘form_api_rates_’); // hide rates continue button hide_me_09222560252(‘continue_rates’); // empty doctype form clear_me_09222560252(‘form_dock_type_’); hide_me_09222560252(‘form_dock_type_’); // empty foxy form clear_me_09222560252(‘form_foxy_form_’); hide_me_09222560252(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_09222560252]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_09222560252’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_09222560252(); // hide contine zip / international button $(‘#continue_zip_09222560252’).hide(); $(‘#continue_international_09222560252’).hide(); $(‘#continue_rates_09222560252’).hide(); // poplate and show res form res_add_empty_html_09222560252(); $(‘#form_res_type_09222560252’).show(); } }); }); function zip_code_empty_html_09222560252(){ // clear form zip html $(‘#form_zip_09222560252’).html(“); // populate form zip html $(‘#form_zip_09222560252’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_09222560252(){ // clear form zip html $(‘#form_zip_09222560252’).html(“); // populate form zip html $(‘#form_zip_09222560252’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_09222560252(yes_no){ $(‘#form_res_type_09222560252’).html(“); // populate form res html $(‘#form_res_type_09222560252’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_09222560252(yes_no){ $(‘#form_dock_type_09222560252’).html(“); // populate dock form html $(‘#form_dock_type_09222560252’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_09222560252; function get_rates_09222560252(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_09222560252=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_09222560252=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0922-256-0252'; rates_atc_item_price='18.99'; rates_atc_name='Shop Equipment'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='38'; rates_atc_length='24'; rates_atc_width='20'; rates_atc_height='17'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/1022/0922256/20221011142237086_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_09222560252').html(''); $('#form_api_rates_09222560252').hide(); $('#pls_asw_09222560252').hide(); $('#loading_gif_09222560252').html(''); $('#loading_gif_09222560252').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_09222560252’).show(); //send data to api rates_post_09222560252 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0922-256-0252’, rates_atc_itemname_post: ‘Shop Equipment’, rates_atc_item_sale_type_post: ’02’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘18.99’ }, function( data ) { //// start test post url //rates_post_09222560252 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_09222560252’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_09222560252=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_09222560252.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_09222560252’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_09222560252.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_09222560252’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_09222560252’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09222560252(); $(‘#shp_type_09222560252’).val(‘TBD’); $(‘#shp_name_09222560252’).val(‘TBD’) $(‘#shp_price_09222560252’).val(‘TBD’); $(‘#hand_fee_09222560252’).val(‘TBD’); $(‘#continue_rates_09222560252’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_09222560252’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_09222560252’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_09222560252’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_09222560252(); $(‘#shp_type_09222560252’).val(‘TBD’); $(‘#shp_name_09222560252’).val(‘TBD’) $(‘#shp_price_09222560252’).val(‘TBD’); $(‘#hand_fee_09222560252’).val(‘TBD’); //rate_item_price_09222560252=’18.99′; // $(‘#price’).val((Number(rate_item_price_09222560252) + Number(rate_info_price_09222560252)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_09222560252’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_09222560252’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_09222560252’).append(”); // clear and hide the loading gif $(‘#loading_gif_09222560252’).html(”); $(‘#loading_gif_09222560252’).hide(); // show the shipping rates div $(‘#form_api_rates_09222560252’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_09222560252.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_09222560252’).html(”); $(‘#form_api_rates_09222560252’).hide(); //$(‘#pls_asw_09222560252’).show(); $(‘#loading_gif_09222560252’).html(”); $(‘#loading_gif_09222560252’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_09222560252').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_09222560252').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_09222560252').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel09222560252').html(''); //$('#ModalLabel09222560252').html(`Delivery Type`); //// change directions lang //$('#pls_asw_09222560252').html(''); //$('#pls_asw_09222560252').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_09222560252’).show(); //// show delivery type buttons //$(‘#is_ship_09222560252’).show(); //$(‘#is_pickup_09222560252’).show(); //zip_code_empty_html_09222560252(); //res_add_empty_html_09222560252(); //dock_add_empty_html_09222560252(); //delivery_type_empty_html_09222560252(); // //$(‘#loading_gif_09222560252’).html(”); //$(‘#loading_gif_09222560252’).hide(); //$(‘#form_api_rates_09222560252’).html(”); //$(‘#form_api_rates_09222560252’).hide(); hide_me_09222560252(‘form_delivery_type_09222560252’); hide_me_09222560252(‘form_zip_09222560252’); hide_me_09222560252(‘form_res_type_09222560252’); hide_me_09222560252(‘form_dock_type_09222560252’); hide_me_09222560252(‘form_api_rates_09222560252’); hide_me_09222560252(‘form_foxy_form_09222560252’); hide_me_09222560252(‘loading_gif_09222560252’); hide_me_09222560252(‘continue_rates_09222560252’); hide_me_09222560252(‘continue_zip_09222560252’); hide_me_09222560252(‘continue_international_09222560252’); clear_me_09222560252(‘form_delivery_type_09222560252’); clear_me_09222560252(‘form_zip_09222560252’); clear_me_09222560252(‘form_res_type_09222560252’); clear_me_09222560252(‘form_dock_type_09222560252’); clear_me_09222560252(‘form_api_rates_09222560252’); clear_me_09222560252(‘form_foxy_form_09222560252’); clear_me_09222560252(‘loading_gif_09222560252’); }); }); // hide id starting with function hide_me_09222560252(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_09222560252(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_09222560252(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_09222560252(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_09222560252’).modal(‘hide’); jQuery(‘#modal_09222560252’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_09222560252(){ // clear form zip html $(‘#form_qty_09222560252’).html(“); // populate form zip html $(‘#form_qty_09222560252’).html(`

How many would you like?(`+max_qty_avail_09222560252+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0922-256-0252″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0922-256-0252’, ‘page_type’: ‘search results page’,’price’: ‘18.99’,’category’: ‘Electrical’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0922-256-0252’, ‘18.99’); // END HT $(‘#favorites_heart_icon_0922-256-0252_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0922-256-0252_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0922-256-0252_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-18:hidden').length) { }else{ get_thumbs(18, 18168, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0922/0722043/20220923135734260_L.JPG', '', '0722-043-1822') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-18:hidden').length) { }else{ get_thumbs(18, 18168, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/0922/0722043/20220923135734260_L.JPG', '', '0722-043-1822') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0722-043-1822
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
Dimensions L x W x H (inches)
24 x 20 x 9
Weight (lb)
45
Showroom Aisle
06A
Showroom Bay
3000
Category
Hardware
Location
Euclid, OH
Item Details

Shop Equipment

Euclid, OH

$239.99 $288.00 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_07220431822' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_07220431822(); build_foxycart_form_07220431822(); $('#shp_type_07220431822').val('PICKUP'); $('#shp_name_07220431822').val('PICKUP') $('#shp_price_07220431822').val('$0.00'); $('#hand_fee_07220431822').val('$0.00'); $('#shp_zip_07220431822').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_07220431822(); $('#form_email_07220431822').show(); build_foxycart_form_07220431822(); $('#continue_rates_07220431822').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_07220431822(); $('#form_email_07220431822').show(); $('#continue_email_07220431822 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_07220431822' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_07220431822(); // populate and show zip code / country form and zip code button //zip_code_empty_html_07220431822(); // $('#form_zip_07220431822').show(); // $('#continue_zip_07220431822 ').show(); // $('#continue_international_07220431822 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_07220431822(); $('#form_email_07220431822').show(); // poplate and show zip zip_code_empty_html_07220431822(); $('#form_zip_07220431822').show(); $('#continue_zip_07220431822 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_07220431822(); $('#form_email_07220431822').show(); $('#continue_email_07220431822 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_07220431822' ,function(){ //abort rates post if exists if (typeof rates_post_07220431822 !== 'undefined') { rates_post_07220431822.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_07220431822('form_email_07220431822'); hide_me_07220431822('form_zip_07220431822'); hide_me_07220431822('form_res_type_07220431822'); hide_me_07220431822('form_dock_type_07220431822'); hide_me_07220431822('form_api_rates_07220431822'); hide_me_07220431822('form_foxy_form_07220431822'); hide_me_07220431822('loading_gif_07220431822'); hide_me_07220431822('continue_rates_07220431822'); hide_me_07220431822('continue_zip_07220431822'); hide_me_07220431822('continue_email_07220431822'); hide_me_07220431822('continue_international_07220431822'); clear_me_07220431822('form_email_07220431822'); clear_me_07220431822('form_zip_07220431822'); clear_me_07220431822('form_res_type_07220431822'); clear_me_07220431822('form_dock_type_07220431822'); clear_me_07220431822('form_api_rates_07220431822'); clear_me_07220431822('form_foxy_form_07220431822'); clear_me_07220431822('loading_gif_07220431822'); // reset all forms delivery_type_empty_html_07220431822(); zip_code_empty_html_07220431822(); res_add_empty_html_07220431822(); dock_add_empty_html_07220431822(); email_empty_html_07220431822(); // align info left $('#form_delivery_type_07220431822').attr('align','center') // show directions lang $('#pls_asw_07220431822').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_07220431822').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_07220431822=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_07220431822=='1'){ // build fc form build_foxycart_form_07220431822(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_07220431822').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_07220431822').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_07220431822').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_07220431822').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0722-043-1822" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_07220431822').val('HGR To Assist'); $('#shp_price_07220431822').val('$0.00'); $('#hand_fee_07220431822').val('$0.00'); // submit fc form $('#foxy_cart_final_form_07220431822').submit(); // clear form data $('#form_foxy_form_07220431822').html(''); // hide the modal $('#modal_07220431822').modal('hide'); clear_foxy_cart_form_07220431822(); // change add to cart button status to added add_to_cart_status('add', '07220431822'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_07220431822=localStorage.getItem("atc_international"); if(is_international_ship_set_07220431822=='1'){ // build fc form build_foxycart_form_07220431822(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_07220431822').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_07220431822').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_07220431822').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_07220431822').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0722-043-1822" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_07220431822').val('HGR To Assist'); $('#shp_name_07220431822').val('HGR To Assist'); $('#shp_price_07220431822').val('TBD'); $('#hand_fee_07220431822').val('TBD'); // submit fc form $('#foxy_cart_final_form_07220431822').submit(); // clear form data $('#form_foxy_form_07220431822').html(''); // hide the modal $('#modal_07220431822').modal('hide'); clear_foxy_cart_form_07220431822(); // change add to cart button status to added add_to_cart_status('add', '07220431822'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_07220431822(); $('#form_delivery_type_07220431822').show(); // hide pls_asw_ hide_me_07220431822('pls_asw_07220431822'); //// populate and show zip form // zip_code_empty_html_07220431822(); // $('#form_zip_07220431822').show(); // $('#continue_zip_07220431822 ').show(); // $('#continue_international_07220431822 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_07220431822(); $('#form_email_07220431822').show(); // poplate and show zip zip_code_empty_html_07220431822(); $('#form_zip_07220431822').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_07220431822(); $('#form_email_07220431822').show(); $('#continue_email_07220431822 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_07220431822(); $('#form_delivery_type_07220431822').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_07220431822(); $('#shp_type_07220431822').val('PICKUP'); $('#shp_name_07220431822').val('PICKUP') $('#shp_price_07220431822').val('$0.00'); $('#shp_zip_07220431822').val('00000'); $('#hand_fee_07220431822').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_07220431822(); $('#form_email_07220431822').show(); build_foxycart_form_07220431822(); $('#continue_rates_07220431822').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_07220431822(); $('#form_email_07220431822').show(); $('#continue_email_07220431822 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_07220431822(); $('#form_delivery_type_07220431822').show(); } }); }); function delivery_type_empty_html_07220431822(){ // change header lang $('#ModalLabel07220431822').html(''); $('#ModalLabel07220431822').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_07220431822').html(''); $('#pls_asw_07220431822').html(`This item is located in Euclid, OH

`); // clear delivery_type html $(‘#form_delivery_type_07220431822’).html(“); // populate form delivery_type html $(‘#form_delivery_type_07220431822’).html(`

`); } function delivery_type_set_html_07220431822(){ if(max_qty_avail_07220431822>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel07220431822’).html(”); $(‘#ModalLabel07220431822’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_07220431822’).hide(); $(‘#is_pickup_07220431822’).hide(); // align info left $(‘#form_delivery_type_07220431822’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_07220431822’).html(` Ship From: Euclid, OH change`+qty_html); // hide directions lang $(‘#pls_asw_07220431822’).hide(); // center the directions lang $(‘#form_delivery_type_07220431822’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_07220431822’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel07220431822’).html(”); $(‘#ModalLabel07220431822’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_07220431822’).hide(); $(‘#is_pickup_07220431822’).hide(); // align info left $(‘#form_delivery_type_07220431822’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_07220431822’).html(` Pickup in: Euclid, OH change `+qty_html); // hide directions lang $(‘#pls_asw_07220431822’).hide(); // center the directions lang $(‘#form_delivery_type_07220431822’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_07220431822’ ,function(){ jQuery(‘#modal_07220431822’).modal(‘hide’); jQuery(‘#modal_qty_07220431822’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_07220431822" ).click(function() { // if email valid if($('#ship_email_07220431822').val() !='' && validateEmail($('#ship_email_07220431822').val())===true){ // set email/country val atc_email_val = $('#ship_email_07220431822').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_07220431822(); // hide contine email & international buttons $('#continue_email_07220431822').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_07220431822(); $('#form_zip_07220431822').show(); $('#continue_zip_07220431822').show(); $('#continue_international_07220431822 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_07220431822(); $('#continue_rates_07220431822').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_07220431822' ,function(){ //abort rates post if exists if (typeof rates_post_07220431822 !== 'undefined') { rates_post_07220431822.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_07220431822 ').hide(); $('#continue_zip_07220431822 ').hide(); $('#continue_international_07220431822 ').hide(); // empty and show email/country form email_empty_html_07220431822(); // show contine email/iternational button $('#continue_email_07220431822').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_07220431822('form_zip_'); hide_me_07220431822('form_zip_'); // empty res form //clear_me_07220431822('form_res_type_'); hide_me_07220431822('form_res_type_'); // empty loading div //clear_me_07220431822('loading_gif_'); hide_me_07220431822('loading_gif_'); // empty rates form //clear_me_07220431822('form_api_rates_'); hide_me_07220431822('form_api_rates_'); // hide rates continue button hide_me_07220431822('continue_rates'); // empty doctype form //clear_me_07220431822('form_dock_type_'); hide_me_07220431822('form_dock_type_'); // empty foxy form //clear_me_07220431822('form_foxy_form_'); //hide_me_07220431822('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_07220431822]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_07220431822').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_07220431822(); // hide contine email / international button $('#continue_email_07220431822').hide(); $('#form_email_07220431822').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_07220431822(); $('#form_zip_07220431822').show(); $('#continue_zip_07220431822').show(); $('#continue_international_07220431822 ').show(); } } }); }); function email_empty_html_07220431822(){ // clear form email html $('#form_email_07220431822').html(“); // populate form email html $('#form_email_07220431822').html(` 1. What is your email address? `); } function email_set_html_07220431822(){ // clear form email html $('#form_email_07220431822').html(“); // populate form email html $('#form_email_07220431822').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_07220431822" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_07220431822').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_07220431822').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_07220431822(); // hide contine zip & international buttons $('#continue_zip_07220431822').hide(); $('#continue_international_07220431822').hide(); // Show empty residential form res_add_empty_html_07220431822(); $('#form_res_type_07220431822').show(); }); } }); // END click contine zip // START click international $( "#continue_international_07220431822" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_07220431822(); // hide contine zip & international buttons $('#continue_zip_07220431822').hide(); $('#continue_international_07220431822').hide(); $('#chosen_rate').html(''); $('#form_api_rates_07220431822').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_07220431822(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_07220431822’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_07220431822_99’).click(); $(‘#form_api_rates_07220431822’).show(); $(‘#continue_rates_07220431822’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_07220431822’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_07220431822 !== ‘undefined’) { rates_post_07220431822.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_07220431822(); // show contine zip/iternational button $(‘#continue_zip_07220431822’).show(); $(‘#continue_international_07220431822’).show(); hide_me_07220431822(‘form_res_type_07220431822’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_07220431822]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_07220431822(); // clear dock type cookie and local storage clear_dock_type_storage_07220431822(); // empty res form clear_me_07220431822(‘form_res_type_’); hide_me_07220431822(‘form_res_type_’); // empty loading div clear_me_07220431822(‘loading_gif_’); hide_me_07220431822(‘loading_gif_’); // empty rates form clear_me_07220431822(‘form_api_rates_’); hide_me_07220431822(‘form_api_rates_’); // hide rates continue button hide_me_07220431822(‘continue_rates’); // empty doctype form clear_me_07220431822(‘form_dock_type_’); hide_me_07220431822(‘form_dock_type_’); // empty foxy form clear_me_07220431822(‘form_foxy_form_’); hide_me_07220431822(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_07220431822]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_07220431822’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_07220431822(); // hide contine zip / international button $(‘#continue_zip_07220431822’).hide(); $(‘#continue_international_07220431822’).hide(); $(‘#continue_rates_07220431822’).hide(); // poplate and show res form res_add_empty_html_07220431822(); $(‘#form_res_type_07220431822’).show(); } }); }); function zip_code_empty_html_07220431822(){ // clear form zip html $(‘#form_zip_07220431822’).html(“); // populate form zip html $(‘#form_zip_07220431822’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_07220431822(){ // clear form zip html $(‘#form_zip_07220431822’).html(“); // populate form zip html $(‘#form_zip_07220431822’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_07220431822(yes_no){ $(‘#form_res_type_07220431822’).html(“); // populate form res html $(‘#form_res_type_07220431822’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_07220431822(yes_no){ $(‘#form_dock_type_07220431822’).html(“); // populate dock form html $(‘#form_dock_type_07220431822’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_07220431822; function get_rates_07220431822(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_07220431822=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_07220431822=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0722-043-1822'; rates_atc_item_price='239.99'; rates_atc_name='Shop Equipment'; rates_atc_loc='Euclid OH'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='45'; rates_atc_length='24'; rates_atc_width='20'; rates_atc_height='9'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/0922/0722043/20220923135734119_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_07220431822').html(''); $('#form_api_rates_07220431822').hide(); $('#pls_asw_07220431822').hide(); $('#loading_gif_07220431822').html(''); $('#loading_gif_07220431822').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_07220431822’).show(); //send data to api rates_post_07220431822 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0722-043-1822’, rates_atc_itemname_post: ‘Shop Equipment’, rates_atc_item_sale_type_post: ’02’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘239.99’ }, function( data ) { //// start test post url //rates_post_07220431822 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_07220431822’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_07220431822=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_07220431822.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_07220431822’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_07220431822.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_07220431822’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_07220431822’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_07220431822(); $(‘#shp_type_07220431822’).val(‘TBD’); $(‘#shp_name_07220431822’).val(‘TBD’) $(‘#shp_price_07220431822’).val(‘TBD’); $(‘#hand_fee_07220431822’).val(‘TBD’); $(‘#continue_rates_07220431822’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_07220431822’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_07220431822’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_07220431822’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_07220431822(); $(‘#shp_type_07220431822’).val(‘TBD’); $(‘#shp_name_07220431822’).val(‘TBD’) $(‘#shp_price_07220431822’).val(‘TBD’); $(‘#hand_fee_07220431822’).val(‘TBD’); //rate_item_price_07220431822=’239.99′; // $(‘#price’).val((Number(rate_item_price_07220431822) + Number(rate_info_price_07220431822)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_07220431822’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_07220431822’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_07220431822’).append(”); // clear and hide the loading gif $(‘#loading_gif_07220431822’).html(”); $(‘#loading_gif_07220431822’).hide(); // show the shipping rates div $(‘#form_api_rates_07220431822’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_07220431822.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_07220431822’).html(”); $(‘#form_api_rates_07220431822’).hide(); //$(‘#pls_asw_07220431822’).show(); $(‘#loading_gif_07220431822’).html(”); $(‘#loading_gif_07220431822’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_07220431822').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_07220431822').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_07220431822').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel07220431822').html(''); //$('#ModalLabel07220431822').html(`Delivery Type`); //// change directions lang //$('#pls_asw_07220431822').html(''); //$('#pls_asw_07220431822').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_07220431822’).show(); //// show delivery type buttons //$(‘#is_ship_07220431822’).show(); //$(‘#is_pickup_07220431822’).show(); //zip_code_empty_html_07220431822(); //res_add_empty_html_07220431822(); //dock_add_empty_html_07220431822(); //delivery_type_empty_html_07220431822(); // //$(‘#loading_gif_07220431822’).html(”); //$(‘#loading_gif_07220431822’).hide(); //$(‘#form_api_rates_07220431822’).html(”); //$(‘#form_api_rates_07220431822’).hide(); hide_me_07220431822(‘form_delivery_type_07220431822’); hide_me_07220431822(‘form_zip_07220431822’); hide_me_07220431822(‘form_res_type_07220431822’); hide_me_07220431822(‘form_dock_type_07220431822’); hide_me_07220431822(‘form_api_rates_07220431822’); hide_me_07220431822(‘form_foxy_form_07220431822’); hide_me_07220431822(‘loading_gif_07220431822’); hide_me_07220431822(‘continue_rates_07220431822’); hide_me_07220431822(‘continue_zip_07220431822’); hide_me_07220431822(‘continue_international_07220431822’); clear_me_07220431822(‘form_delivery_type_07220431822’); clear_me_07220431822(‘form_zip_07220431822’); clear_me_07220431822(‘form_res_type_07220431822’); clear_me_07220431822(‘form_dock_type_07220431822’); clear_me_07220431822(‘form_api_rates_07220431822’); clear_me_07220431822(‘form_foxy_form_07220431822’); clear_me_07220431822(‘loading_gif_07220431822’); }); }); // hide id starting with function hide_me_07220431822(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_07220431822(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_07220431822(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_07220431822(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_07220431822’).modal(‘hide’); jQuery(‘#modal_07220431822’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_07220431822(){ // clear form zip html $(‘#form_qty_07220431822’).html(“); // populate form zip html $(‘#form_qty_07220431822’).html(`

How many would you like?(`+max_qty_avail_07220431822+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0722-043-1822″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0722-043-1822’, ‘page_type’: ‘search results page’,’price’: ‘239.99’,’category’: ‘Hardware’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0722-043-1822’, ‘239.99’); // END HT $(‘#favorites_heart_icon_0722-043-1822_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0722-043-1822_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0722-043-1822_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print View More Info

<![CDATA[<![CDATA[<![CDATA[ $( ".product-box" ).click(function() { setTimeout(function(){ if ($('.product-19:hidden').length) { }else{ get_thumbs(19, 17347, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0522034/20221005143623823_L.JPG', '', '0522-034-0071') } }, 100); }); $( ".product-list" ).click(function() { setTimeout(function(){ if ($('.product-19:hidden').length) { }else{ get_thumbs(19, 17347, '', '', '', '', 'https://image.hgrinc.com/tr:n-tmb/inventory/1022/0522034/20221005143623823_L.JPG', '', '0522-034-0071') } }, 100); }); function get_thumbs(count, prod_id, image_one, image_two, image_three, image_four, image_five, image_six, sku_val){ $.post( "/wp-content/themes/HGR/post/get_thumbs.php", { post_id: prod_id, counts: count, image_1: image_one, image_2:image_two, image_3:image_three, image_4:image_four, image_5:image_five, image_6:image_six, sku:sku_val }) .done(function( data ) { $( "#thumbs_div_" + count ).html(data); bsPopup(count) }); } var bsPopup = function(counts) { // Magnific Popup Options for Images $('#thumbs_div_' + counts).each(function() { // the containers for all your galleries $(this).magnificPopup({ delegate: 'a', // the selector for gallery item type: 'image', gallery: { enabled: true, // set to true to enable gallery preload: [0,2], // read about this option in next Lazy-loading section navigateByImgClick: true, titleSrc: 'title', arrowMarkup: '

Inventory Number
0522-034-0071
Quantity
1
Manufacturer Model Number
Serial Number Make Year
Capacity Electrical
90 V
Dimensions L x W x H (inches)
Unavailable
Weight (lb)
870
Showroom Aisle
016
Showroom Bay
0200
Category
Material Handling
Location
Watertown, WI
Item Details
5 Hp Motor, 1750 Rpm, 735# 86″ X 67″ X 78″, 135 # 71″ X 43″ X 30″, *contains 2 Pieces

Hopper And Accessories

Watertown, WI

$623 $779 Last Chance

Add to Cart

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click delivery_type = is_pickup $(document.body).on('click', '#is_pickup_05220340071' ,function(){ //console.log('delivery_type: click delivery_type = is_pickup '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'pickup' }) .done(function( data ) { // set local vars for immediate use localStorage.setItem("atc_delivery", 'pickup'); localStorage.setItem("atc_zip", '00000'); localStorage.setItem("atc_res", '0'); localStorage.setItem("atc_dock", '0'); local_atc_delivery=localStorage.getItem("atc_delivery"); // show delivery_type info delivery_type_set_html_05220340071(); build_foxycart_form_05220340071(); $('#shp_type_05220340071').val('PICKUP'); $('#shp_name_05220340071').val('PICKUP') $('#shp_price_05220340071').val('$0.00'); $('#hand_fee_05220340071').val('$0.00'); $('#shp_zip_05220340071').val('00000'); //console.log('delivery_type – click is_pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_05220340071(); $('#form_email_05220340071').show(); build_foxycart_form_05220340071(); $('#continue_rates_05220340071').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_05220340071(); $('#form_email_05220340071').show(); $('#continue_email_05220340071 ').show(); } }); // END click delivery_type = is_pickup }); // START click delivery_type = is_ship $(document.body).on('click', '#is_ship_05220340071' ,function(){ //console.log('delivery_type: click delivery_type = is_ship '); // post delivery_type to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'ship' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); // set local delivery_type for immediate use localStorage.setItem("atc_delivery", 'ship'); // show delivery_type info local_atc_delivery=localStorage.getItem("atc_delivery"); delivery_type_set_html_05220340071(); // populate and show zip code / country form and zip code button //zip_code_empty_html_05220340071(); // $('#form_zip_05220340071').show(); // $('#continue_zip_05220340071 ').show(); // $('#continue_international_05220340071 ').show(); //console.log('delivery_type – click is_ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_05220340071(); $('#form_email_05220340071').show(); // poplate and show zip zip_code_empty_html_05220340071(); $('#form_zip_05220340071').show(); $('#continue_zip_05220340071 ').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_05220340071(); $('#form_email_05220340071').show(); $('#continue_email_05220340071 ').show(); } }); // END click delivery_type = is_ship }); // START click [edit] delivery_type = is_ship $(document.body).on('click', '#edit_delivery_type_05220340071' ,function(){ //abort rates post if exists if (typeof rates_post_05220340071 !== 'undefined') { rates_post_05220340071.abort(); } // delete all atc cookies $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "atc_delivery", atc_cookie_val_post: 'all' }) .done(function( data ) { // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_delivery"); //localStorage.removeItem("atc_email"); //hide and empty all other divs & buttons hide_me_05220340071('form_email_05220340071'); hide_me_05220340071('form_zip_05220340071'); hide_me_05220340071('form_res_type_05220340071'); hide_me_05220340071('form_dock_type_05220340071'); hide_me_05220340071('form_api_rates_05220340071'); hide_me_05220340071('form_foxy_form_05220340071'); hide_me_05220340071('loading_gif_05220340071'); hide_me_05220340071('continue_rates_05220340071'); hide_me_05220340071('continue_zip_05220340071'); hide_me_05220340071('continue_email_05220340071'); hide_me_05220340071('continue_international_05220340071'); clear_me_05220340071('form_email_05220340071'); clear_me_05220340071('form_zip_05220340071'); clear_me_05220340071('form_res_type_05220340071'); clear_me_05220340071('form_dock_type_05220340071'); clear_me_05220340071('form_api_rates_05220340071'); clear_me_05220340071('form_foxy_form_05220340071'); clear_me_05220340071('loading_gif_05220340071'); // reset all forms delivery_type_empty_html_05220340071(); zip_code_empty_html_05220340071(); res_add_empty_html_05220340071(); dock_add_empty_html_05220340071(); email_empty_html_05220340071(); // align info left $('#form_delivery_type_05220340071').attr('align','center') // show directions lang $('#pls_asw_05220340071').show(); //console.log('delivery_type: click [edit] delivery_type = is_ship '); }); }); // END click [edit] delivery_type = is_ship // end doc ready }); // on modal shown jQuery(function($) { $('#modal_05220340071').on('shown.bs.modal', function(e) { //console.log('delivery_type: on modal shown '); // START HGR ASSIST // if local data atc_hgr_assist=1 is_hgr_assist_set_05220340071=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_05220340071=='1'){ // build fc form build_foxycart_form_05220340071(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_05220340071').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_05220340071').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_05220340071').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_05220340071').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0522-034-0071" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals $('#shp_name_05220340071').val('HGR To Assist'); $('#shp_price_05220340071').val('$0.00'); $('#hand_fee_05220340071').val('$0.00'); // submit fc form $('#foxy_cart_final_form_05220340071').submit(); // clear form data $('#form_foxy_form_05220340071').html(''); // hide the modal $('#modal_05220340071').modal('hide'); clear_foxy_cart_form_05220340071(); // change add to cart button status to added add_to_cart_status('add', '05220340071'); // exit function change_all_items_to_hgr_assist() return; } // END HGR ASSIST // START INTERNATIONAL SHIP // if local data atc_hgr_assist=1 is_international_ship_set_05220340071=localStorage.getItem("atc_international"); if(is_international_ship_set_05220340071=='1'){ // build fc form build_foxycart_form_05220340071(); //Enhanced Ecommerce Tracking Google DataLayer Events var dl_ecom_prod_name = $('#foxy_cart_final_form_05220340071').find('input[name="name"]').val(); var dl_ecom_prod_id = $('#foxy_cart_final_form_05220340071').find('input[name="code"]').val(); var dl_ecom_prod_price_raw = $('#foxy_cart_final_form_05220340071').find('input[name="price"]').val(); var dl_ecom_prod_price2 = dl_ecom_prod_price_raw.replace('$', ''); var dl_ecom_prod_price = dl_ecom_prod_price2.replace(',', ''); var dl_ecom_prod_qty = $('#foxy_cart_final_form_05220340071').find('input[name="quantity"]').val(); $.post("/wp-content/themes/HGR/fc/inc/ecomm_tracking/post/data_layer_info.php", { dl_ecom_sku_with_dash: "0522-034-0071" }) .done(function (data) { var exploded_dl_ecom_data = data.split('|'); var dl_ecom_prod_brand = exploded_dl_ecom_data[0]; var dl_ecom_prod_category = exploded_dl_ecom_data[1]; var dl_ecom_prod_variant = exploded_dl_ecom_data[2]; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'event': 'addToCart', 'ecommerce': { 'currencyCode': 'USD', 'add': { // 'add' actionFieldObject measures. 'products': [{ // adding a product to a shopping cart. 'name': dl_ecom_prod_name, 'id': dl_ecom_prod_id, 'price': dl_ecom_prod_price, 'brand': dl_ecom_prod_brand, 'category': dl_ecom_prod_category, 'variant': dl_ecom_prod_variant, 'quantity': dl_ecom_prod_qty }] } } }); }); // Set form input vals //$('#shp_type_05220340071').val('HGR To Assist'); $('#shp_name_05220340071').val('HGR To Assist'); $('#shp_price_05220340071').val('TBD'); $('#hand_fee_05220340071').val('TBD'); // submit fc form $('#foxy_cart_final_form_05220340071').submit(); // clear form data $('#form_foxy_form_05220340071').html(''); // hide the modal $('#modal_05220340071').modal('hide'); clear_foxy_cart_form_05220340071(); // change add to cart button status to added add_to_cart_status('add', '05220340071'); // exit function return; } // END INTERNATIONAL SHIP // get the atc_delivery local storage val if avail local_atc_delivery=localStorage.getItem("atc_delivery"); // chk if atc_delivery var exists and = ship if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='ship'){ // empty and show completed delivery_type form delivery_type_set_html_05220340071(); $('#form_delivery_type_05220340071').show(); // hide pls_asw_ hide_me_05220340071('pls_asw_05220340071'); //// populate and show zip form // zip_code_empty_html_05220340071(); // $('#form_zip_05220340071').show(); // $('#continue_zip_05220340071 ').show(); // $('#continue_international_05220340071 ').show(); // populate and show email //console.log('delivery_type – on modal shown – ship – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null){ email_set_html_05220340071(); $('#form_email_05220340071').show(); // poplate and show zip zip_code_empty_html_05220340071(); $('#form_zip_05220340071').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null){ email_empty_html_05220340071(); $('#form_email_05220340071').show(); $('#continue_email_05220340071 ').show(); } // else if atc_delivery var exists and = pickup }else if(typeof local_atc_delivery !== 'undefined' && local_atc_delivery==='pickup'){ // do something else for pickup delivery_type_set_html_05220340071(); $('#form_delivery_type_05220340071').show(); // clear all atc local storage localStorage.removeItem("atc_zip"); localStorage.removeItem("atc_dock"); localStorage.removeItem("atc_res"); localStorage.removeItem("atc_dock"); //localStorage.removeItem("atc_email"); build_foxycart_form_05220340071(); $('#shp_type_05220340071').val('PICKUP'); $('#shp_name_05220340071').val('PICKUP') $('#shp_price_05220340071').val('$0.00'); $('#shp_zip_05220340071').val('00000'); $('#hand_fee_05220340071').val('$0.00'); //console.log('delivery_type – on modal shown – pickup – atc_email value: '+localStorage.getItem("atc_email")); if(localStorage.getItem("atc_email") !== 'undefined' && localStorage.getItem("atc_email") != null && localStorage.getItem("atc_email") != ''){ email_set_html_05220340071(); $('#form_email_05220340071').show(); build_foxycart_form_05220340071(); $('#continue_rates_05220340071').show(); }else if(localStorage.getItem("atc_email") == 'undefined' || localStorage.getItem("atc_email") === null || localStorage.getItem("atc_email") == ''){ email_empty_html_05220340071(); $('#form_email_05220340071').show(); $('#continue_email_05220340071 ').show(); } // else if atc_delivery var does not exist }else if (localStorage.getItem("atc_delivery") === null) { // empty and show emtpy delivery_type form delivery_type_empty_html_05220340071(); $('#form_delivery_type_05220340071').show(); } }); }); function delivery_type_empty_html_05220340071(){ // change header lang $('#ModalLabel05220340071').html(''); $('#ModalLabel05220340071').html(`Ship or Pickup Item?`); // change directions lang $('#pls_asw_05220340071').html(''); $('#pls_asw_05220340071').html(`This item is located in Watertown, WI

`); // clear delivery_type html $(‘#form_delivery_type_05220340071’).html(“); // populate form delivery_type html $(‘#form_delivery_type_05220340071’).html(`

`); } function delivery_type_set_html_05220340071(){ if(max_qty_avail_05220340071>1){ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ` change`; }else{ var qty_html=`
Qty: ` + localStorage.getItem(“atc_qty”) + ``; } // if delivery type = ship if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’ship’){ // change header lang $(‘#ModalLabel05220340071’).html(”); $(‘#ModalLabel05220340071’).html(`Shipping Rates`); // hide the is_pickup buttons $(‘#is_ship_05220340071’).hide(); $(‘#is_pickup_05220340071’).hide(); // align info left $(‘#form_delivery_type_05220340071’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_05220340071’).html(` Ship From: Watertown, WI change`+qty_html); // hide directions lang $(‘#pls_asw_05220340071’).hide(); // center the directions lang $(‘#form_delivery_type_05220340071’).attr(‘align’,’center’); // add new directions lang $(‘#form_delivery_type_05220340071’).append(`

To get the most accurate shipping rates, please answer a few questions:

`); // if delivery type = pickup }else if(typeof local_atc_delivery !== ‘undefined’ && local_atc_delivery===’pickup’){ // change header lang $(‘#ModalLabel05220340071’).html(”); $(‘#ModalLabel05220340071’).html(`Pickup Details For This Item`); // hide the is_pickup buttons $(‘#is_ship_05220340071’).hide(); $(‘#is_pickup_05220340071’).hide(); // align info left $(‘#form_delivery_type_05220340071’).attr(‘align’,”); // populate is_pickup with chosen info $(‘#form_delivery_type_05220340071’).html(` Pickup in: Watertown, WI change `+qty_html); // hide directions lang $(‘#pls_asw_05220340071’).hide(); // center the directions lang $(‘#form_delivery_type_05220340071’).attr(‘align’,’center’); } } // START click [edit] qty = $(document.body).on(‘click’, ‘#edit_qty_05220340071’ ,function(){ jQuery(‘#modal_05220340071’).modal(‘hide’); jQuery(‘#modal_qty_05220340071’).modal(‘show’); }); // END click [edit] qty function send_get_fc_address_cookie_data(fc_add_cookie_email_val){ // START POST TO FC API TO GET ADDRESS COOKIE VALUES $.post( “/wp-content/themes/HGR/fc/inc/fc_api_cookies.php”, { fc_api_email_val: fc_add_cookie_email_val }) .done(function( data_cookie_api ) { var obj_cookie_api = jQuery.parseJSON(data_cookie_api); // START LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA $.each(obj_cookie_api, function(key_cookie_api,value_cookie_api) { if(value_cookie_api[‘first_name’] != null){ document.cookie = “atc_firstname= “+value_cookie_api[‘first_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname= “+value_cookie_api[‘last_name’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company= “+value_cookie_api[‘company’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1= “+value_cookie_api[‘address1’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2= “+value_cookie_api[‘address2’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city= “+value_cookie_api[‘city’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state= “+value_cookie_api[‘region’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip= “+value_cookie_api[‘postal_code’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country= “+value_cookie_api[‘country’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone= “+value_cookie_api[‘phone’]+”; expires=Fri, 31 Dec 2030 23:59:59 GMT”; localStorage.setItem(“atc_firstname”, value_cookie_api[‘first_name’]); localStorage.setItem(“atc_lastname”, value_cookie_api[‘last_name’]); localStorage.setItem(“atc_company”, value_cookie_api[‘company’]); localStorage.setItem(“atc_address1”, value_cookie_api[‘address1’]); localStorage.setItem(“atc_address2”, value_cookie_api[‘address2’]); localStorage.setItem(“atc_city”, value_cookie_api[‘city’]); localStorage.setItem(“atc_state”, value_cookie_api[‘region’]); localStorage.setItem(“atc_shpzip”, value_cookie_api[‘postal_code’]); localStorage.setItem(“atc_country”, value_cookie_api[‘country’]); localStorage.setItem(“atc_phone”, value_cookie_api[‘phone’]); $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).val(value_cookie_api[‘first_name’]); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).val(value_cookie_api[‘last_name’]); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).val(value_cookie_api[‘address1’]); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).val(value_cookie_api[‘address2’]); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).val(value_cookie_api[‘city’]); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).val(value_cookie_api[‘region’]); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).val(value_cookie_api[‘phone’]); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).val(value_cookie_api[‘company’]); }); if(value_cookie_api[‘postal_code’]!= null){ $(‘[id^= “ship_zip_”]’).each(function(){ $(this).val(value_cookie_api[‘postal_code’]); }); } }else{ $(‘[id^= “customer_email”]’).each(function(){ $(this).val(localStorage.getItem(“atc_email”)); }); //console.log(‘3 ‘+value_cookie_api[‘postal_code’]) //We do not have data, clear the cookies and local storage. localStorage.setItem(“atc_firstname”, “”); localStorage.setItem(“atc_lastname”, “”); localStorage.setItem(“atc_company”, “”); localStorage.setItem(“atc_address1”, “”); localStorage.setItem(“atc_address2”, “”); localStorage.setItem(“atc_city”, “”); localStorage.setItem(“atc_state”, “”); localStorage.setItem(“atc_shpzip”, “”); localStorage.setItem(“atc_country”, “”); localStorage.setItem(“atc_phone”, “”); document.cookie = “atc_firstname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_lastname=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_company=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address1=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_address2=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_city=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_state=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_shpzip=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_country=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; document.cookie = “atc_phone=; expires=Fri, 31 Dec 2030 23:59:59 GMT”; // Remove fields from FC form $(‘[id^= “shipping_first_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_last_name”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address1”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_address2”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_city”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_region”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_postal_code”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_phone”]’).each(function(){ $(this).remove(); }); $(‘[id^= “shipping_company”]’).each(function(){ $(this).remove(); }); } }); // END LOOP THROUGH AND DO THINGS WITH THE JSON OBJECT DATA }); // END POST TO FC API TO GET ADDRESS COOKIE VALUES }

<![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine email $( "#continue_email_05220340071" ).click(function() { // if email valid if($('#ship_email_05220340071').val() !='' && validateEmail($('#ship_email_05220340071').val())===true){ // set email/country val atc_email_val = $('#ship_email_05220340071').val(); // post email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_email", atc_cookie_val_post: atc_email_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_email", atc_email_val); local_atc_email=localStorage.getItem("atc_email"); // empty and show completed email form email_set_html_05220340071(); // hide contine email & international buttons $('#continue_email_05220340071').hide(); // Start if ship if(localStorage.getItem("atc_delivery") == 'ship'){ // Show empty zip form zip_code_empty_html_05220340071(); $('#form_zip_05220340071').show(); $('#continue_zip_05220340071').show(); $('#continue_international_05220340071 ').show(); // End if ship // Start if pickup }else if(localStorage.getItem("atc_delivery") == 'pickup'){ build_foxycart_form_05220340071(); $('#continue_rates_05220340071').show(); } // End if pickup //console.log('email_address: click contine email '); }); } }); // END click contine email // START click edit email $(document.body).on('click', '#edit_email_05220340071' ,function(){ //abort rates post if exists if (typeof rates_post_05220340071 !== 'undefined') { rates_post_05220340071.abort(); } // clear email val //atc_email_val = ''; // post empty email val to set cookie $.post( "/wp-content/themes/HGR/fc/post/delete_cookie.php", { atc_cookie_name_post: "do_nothing" }) .done(function( data ) { // clear local data for immediate use //localStorage.removeItem("atc_email"); //local_atc_email=''; // Hide zip $('#form_zip_05220340071 ').hide(); $('#continue_zip_05220340071 ').hide(); $('#continue_international_05220340071 ').hide(); // empty and show email/country form email_empty_html_05220340071(); // show contine email/iternational button $('#continue_email_05220340071').show(); //console.log('email_address: click edit email '); }); // empty zip form //clear_me_05220340071('form_zip_'); hide_me_05220340071('form_zip_'); // empty res form //clear_me_05220340071('form_res_type_'); hide_me_05220340071('form_res_type_'); // empty loading div //clear_me_05220340071('loading_gif_'); hide_me_05220340071('loading_gif_'); // empty rates form //clear_me_05220340071('form_api_rates_'); hide_me_05220340071('form_api_rates_'); // hide rates continue button hide_me_05220340071('continue_rates'); // empty doctype form //clear_me_05220340071('form_dock_type_'); hide_me_05220340071('form_dock_type_'); // empty foxy form //clear_me_05220340071('form_foxy_form_'); //hide_me_05220340071('form_foxy_form_'); // uncheck dock type radios. //$('input:radio[name=rad_dock_type_05220340071]').each(function () { $(this).prop('checked', false); }); }); // END click edit email }); // END DOC READY // on modal shown jQuery(function($) { $('#modal_05220340071').on('shown.bs.modal', function(e) { //console.log('email_address: on modal shown '); // chk if local_atc_email var exists if(localStorage.getItem("atc_email") !== null && localStorage.getItem("atc_delivery") !== null){ // empty and show completed email form email_set_html_05220340071(); // hide contine email / international button $('#continue_email_05220340071').hide(); $('#form_email_05220340071').show(); if(localStorage.getItem("atc_delivery") !== 'pickup'){ // poplate and show zip zip_code_empty_html_05220340071(); $('#form_zip_05220340071').show(); $('#continue_zip_05220340071').show(); $('#continue_international_05220340071 ').show(); } } }); }); function email_empty_html_05220340071(){ // clear form email html $('#form_email_05220340071').html(“); // populate form email html $('#form_email_05220340071').html(` 1. What is your email address? `); } function email_set_html_05220340071(){ // clear form email html $('#form_email_05220340071').html(“); // populate form email html $('#form_email_05220340071').html(`
1. Your email address: ` + localStorage.getItem(“atc_email”) + ` change`); send_get_fc_address_cookie_data(localStorage.getItem(“atc_email”)) } function validateEmail($email) { var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; return emailReg.test( $email ); } ]]]]]]>]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // START click contine zip $( "#continue_zip_05220340071" ).click(function() { // remove international local val localStorage.removeItem("atc_international"); // remove atc_hgr_assist local val localStorage.removeItem("atc_hgr_assist"); // if zip valid if($('#ship_zip_05220340071').val() !=''){ // set zip/country val atc_zip_val = $('#ship_zip_05220340071').val(); // post zip val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_zip", atc_cookie_val_post: atc_zip_val }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_zip", atc_zip_val); local_atc_zip=localStorage.getItem("atc_zip"); // empty and show completed zip form zip_code_set_html_05220340071(); // hide contine zip & international buttons $('#continue_zip_05220340071').hide(); $('#continue_international_05220340071').hide(); // Show empty residential form res_add_empty_html_05220340071(); $('#form_res_type_05220340071').show(); }); } }); // END click contine zip // START click international $( "#continue_international_05220340071" ).click(function() { // post international val to set cookie $.post( "/wp-content/themes/HGR/fc/post/set_cookie.php", { atc_cookie_name_post: "atc_international", atc_cookie_val_post: '1' }) .done(function( data ) { // set local data for immediate use localStorage.setItem("atc_international", '1'); localStorage.setItem("atc_hgr_assist", '1'); localStorage.setItem("atc_zip", 'International Shipment'); // empty and show completed zip form zip_code_set_html_05220340071(); // hide contine zip & international buttons $('#continue_zip_05220340071').hide(); $('#continue_international_05220340071').hide(); $('#chosen_rate').html(''); $('#form_api_rates_05220340071').append(`We’re sorry, but shipping rates cannot be generated for International locations.
HGR Will assist with shipping and handling after checkout.]]]]]]>]]]]>]]>`); build_foxycart_form_05220340071(); // START HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#form_api_rates_05220340071’).append(`

HGR Ship Assist – TBD

`); // END HGR SHIP ASSIT FOR INTERNATIONAL SELECTION $(‘#rad_ship_type_05220340071_99’).click(); $(‘#form_api_rates_05220340071’).show(); $(‘#continue_rates_05220340071’).show(); }); }); // END click international // START click edit zip $(document.body).on(‘click’, ‘#edit_zip_05220340071’ ,function(){ // remove international local val localStorage.removeItem(“atc_international”); // remove atc_hgr_assist local val localStorage.removeItem(“atc_hgr_assist”); //abort rates post if exists if (typeof rates_post_05220340071 !== ‘undefined’) { rates_post_05220340071.abort(); } // clear zip val atc_zip_val = ”; // post empty zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_zip” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_zip”); local_atc_zip=”; // empty and show zip/country form zip_code_empty_html_05220340071(); // show contine zip/iternational button $(‘#continue_zip_05220340071’).show(); $(‘#continue_international_05220340071’).show(); hide_me_05220340071(‘form_res_type_05220340071’); // uncheck residential radios. $(‘input:radio[name=rad_res_type_05220340071]’).each(function () { $(this).prop(‘checked’, false); }); }); // clear residential cookie and local storage clear_res_storage_05220340071(); // clear dock type cookie and local storage clear_dock_type_storage_05220340071(); // empty res form clear_me_05220340071(‘form_res_type_’); hide_me_05220340071(‘form_res_type_’); // empty loading div clear_me_05220340071(‘loading_gif_’); hide_me_05220340071(‘loading_gif_’); // empty rates form clear_me_05220340071(‘form_api_rates_’); hide_me_05220340071(‘form_api_rates_’); // hide rates continue button hide_me_05220340071(‘continue_rates’); // empty doctype form clear_me_05220340071(‘form_dock_type_’); hide_me_05220340071(‘form_dock_type_’); // empty foxy form clear_me_05220340071(‘form_foxy_form_’); hide_me_05220340071(‘form_foxy_form_’); // uncheck dock type radios. //$(‘input:radio[name=rad_dock_type_05220340071]’).each(function () { $(this).prop(‘checked’, false); }); }); // END click edit zip }); // END DOC READY // on modal shown jQuery(function($) { $(‘#modal_05220340071’).on(‘shown.bs.modal’, function(e) { // chk if local_atc_zip var exists if(localStorage.getItem(“atc_zip”) !== null && localStorage.getItem(“atc_delivery”) !== null && localStorage.getItem(“atc_zip”) !== ‘International Shipment’){ // empty and show completed zip form zip_code_set_html_05220340071(); // hide contine zip / international button $(‘#continue_zip_05220340071’).hide(); $(‘#continue_international_05220340071’).hide(); $(‘#continue_rates_05220340071’).hide(); // poplate and show res form res_add_empty_html_05220340071(); $(‘#form_res_type_05220340071’).show(); } }); }); function zip_code_empty_html_05220340071(){ // clear form zip html $(‘#form_zip_05220340071’).html(“); // populate form zip html $(‘#form_zip_05220340071’).html(` 2. What is the US destination zip code? `); } function zip_code_set_html_05220340071(){ // clear form zip html $(‘#form_zip_05220340071’).html(“); // populate form zip html $(‘#form_zip_05220340071’).html(` 2. Destination zip code: ` + localStorage.getItem(“atc_zip”) + ` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function res_type_set_html_05220340071(yes_no){ $(‘#form_res_type_05220340071’).html(“); // populate form res html $(‘#form_res_type_05220340071’).html(` 3. Residential address: `+yes_no+` change`); } <![CDATA[<![CDATA[]]]]>]]>

No

`); } function dock_type_set_html_05220340071(yes_no){ $(‘#form_dock_type_05220340071’).html(“); // populate dock form html $(‘#form_dock_type_05220340071’).html(` 4. Loading dock: `+yes_no+` change`); } <![CDATA[<![CDATA[<![CDATA[ var rates_post_05220340071; function get_rates_05220340071(){ // START IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST is_hgr_assist_set_05220340071=localStorage.getItem("atc_hgr_assist"); if(is_hgr_assist_set_05220340071=='1'){ return; } // END IF HGR TO ASSIT ACTIVE CANCEL THIS REQUEST rates_atc_email=localStorage.getItem("atc_email"); rates_atc_zip=localStorage.getItem("atc_zip"); rates_atc_res=localStorage.getItem("atc_res"); rates_atc_dock=localStorage.getItem("atc_dock"); rates_atc_sku='0522-034-0071'; rates_atc_item_price='623.00'; rates_atc_name='Hopper And Accessories'; rates_atc_loc='Watertown WI'; //rates_atc_qty='1'; rates_atc_qty=localStorage.getItem("atc_qty"); // pass the shipping API zeros if we do not have values for weight,l,w,h rates_atc_weight='870'; rates_atc_length='0'; rates_atc_width='0'; rates_atc_height='0'; rates_atc_image='https://image.hgrinc.com/tr:n-med/inventory/1022/0522034/20221005143623658_L.JPG'; // START check valid data for rates_atc_zip,rates_atc_dock if(checkZip(rates_atc_zip) && rates_atc_dock=='0' || checkZip(rates_atc_zip) && rates_atc_dock=='1'){ $('#form_api_rates_05220340071').html(''); $('#form_api_rates_05220340071').hide(); $('#pls_asw_05220340071').hide(); $('#loading_gif_05220340071').html(''); $('#loading_gif_05220340071').html(`

Getting shipping rates…
]]]]]]>]]]]>]]>

`); $(‘#loading_gif_05220340071’).show(); //send data to api rates_post_05220340071 = $.post( “/wp-content/themes/HGR/fc/shp_api/atc_get_rates.php”, { rates_atc_email_post: rates_atc_email, rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight, rates_atc_height_post: rates_atc_height, rates_atc_length_post: rates_atc_length, rates_atc_width_post: rates_atc_width, rates_atc_sku_post: ‘0522-034-0071’, rates_atc_itemname_post: ‘Hopper And Accessories’, rates_atc_item_sale_type_post: ’01’,rates_atc_image_post: rates_atc_image, rates_atc_item_price_post: ‘623.00’ }, function( data ) { //// start test post url //rates_post_05220340071 = $.post( “/wp-content/themes/HGR/fc/shp_api/test_api.php”, { rates_atc_zip_post: rates_atc_zip, rates_atc_dock_post: rates_atc_dock, rates_atc_res_post: rates_atc_res, rates_atc_loc_post: rates_atc_loc, rates_atc_qty_post: rates_atc_qty, rates_atc_weight_post: rates_atc_weight }, function( data ) { //// end test post url // START if response from API was ‘true’ if(data.ok===true){ // populate chosen_rate form $(‘#form_api_rates_05220340071’).append(`Please choose a shipping rate:
`); // loop through json results $.each(data.data.shipping_results, function(idx, shipping_results){ // set the var for service_id so we can see if it starts with 1 or 2 (freight or UPS) this_service_id_05220340071=shipping_results.service_id; // if we have a value for shipping_results and = 2 (UPS) if (this_service_id_05220340071.toString().substring(0, 1) == “2”){ if(shipping_results.price>0){ // START GROUND html populate $(‘#form_api_rates_05220340071’).append(`

UPS `+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END GROUND html populate // START FREIGHT html populate // if we have a value for shipping_results and = 1 (FRIEGHT) }else if(this_service_id_05220340071.toString().substring(0, 1) == “1”){ if(shipping_results.price>0){ $(‘#form_api_rates_05220340071’).append(`

`+shipping_results.service_name+` – $`+shipping_results.price.toString().replace(/B(?=(d{3})+(?!d))/g, “,”)+`

`); } // END FREIGHT html populate // START OTHER MESSAGE (NO QUOTE FOR ONE REASON OR ANOTHER) }else{ console.log(shipping_results.details) $(‘#chosen_rate’).html(”); $(‘#form_api_rates_05220340071’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_05220340071(); $(‘#shp_type_05220340071’).val(‘TBD’); $(‘#shp_name_05220340071’).val(‘TBD’) $(‘#shp_price_05220340071’).val(‘TBD’); $(‘#hand_fee_05220340071’).val(‘TBD’); $(‘#continue_rates_05220340071’).show(); // END OTHER MESSAGE (NO QUOTE) } }); // START HGR SHIP ASSIT $(‘#form_api_rates_05220340071’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST // END if response from API was true // START if response from API was NOT true (error) }else{ console.log(data.details) //$(‘#form_api_rates_05220340071’).append(`

Error: `+data.details+`

`); $(‘#form_api_rates_05220340071’).append(`

We’re sorry, but a shipping rate could not be generated at this time. HGR will assist after checkout to determine any additional shipping and handling charges.

`); build_foxycart_form_05220340071(); $(‘#shp_type_05220340071’).val(‘TBD’); $(‘#shp_name_05220340071’).val(‘TBD’) $(‘#shp_price_05220340071’).val(‘TBD’); $(‘#hand_fee_05220340071’).val(‘TBD’); //rate_item_price_05220340071=’623.00′; // $(‘#price’).val((Number(rate_item_price_05220340071) + Number(rate_info_price_05220340071)).toFixed(2)); // START HGR SHIP ASSIT $(‘#form_api_rates_05220340071’).append(`

HGR Ship Assist (for multiple items using UPS, LTL, or partial/full truck loads) – TBD

`); // END HGR SHIP ASSIST $(‘#continue_rates_05220340071’).show(); } // END if response from API was NOT true (error) // finish the html div $(‘#form_api_rates_05220340071’).append(”); // clear and hide the loading gif $(‘#loading_gif_05220340071’).html(”); $(‘#loading_gif_05220340071’).hide(); // show the shipping rates div $(‘#form_api_rates_05220340071’).show(); //// abort rates post if local data no longer exists //}else{ //console.log(‘no dater’) //rates_post_05220340071.abort(); //} //// END only process if local data still exists }, “json”); // END the jquery JSON post // there was no valid data for rates_atc_zip,rates_atc_dock }else{ $(‘#form_api_rates_05220340071’).html(”); $(‘#form_api_rates_05220340071’).hide(); //$(‘#pls_asw_05220340071’).show(); $(‘#loading_gif_05220340071’).html(”); $(‘#loading_gif_05220340071’).show(); } // END check valid data for rates_atc_zip,rates_atc_dock } <![CDATA[<![CDATA[]]]]>]]> <![CDATA[<![CDATA[<![CDATA[ $( document ).ready(function() { // show add to cart after doc ready $('#add_cart_button_05220340071').show(); }); // END DOC READY // on modal shown //jQuery(function($) { // $('#modal_05220340071').on('shown.bs.modal', function(e) { // // // // }); //}); // on modal closed – clear all forms. jQuery(function($) { $('#modal_05220340071').on('hidden.bs.modal', function(e) { // set atc_qty=1 localStorage.setItem("atc_qty", "1"); //// change header lang //$('#ModalLabel05220340071').html(''); //$('#ModalLabel05220340071').html(`Delivery Type`); //// change directions lang //$('#pls_asw_05220340071').html(''); //$('#pls_asw_05220340071').html(`How will this item be delivered?

`); //// show delivery type form //$(‘#form_is_pickup_05220340071’).show(); //// show delivery type buttons //$(‘#is_ship_05220340071’).show(); //$(‘#is_pickup_05220340071’).show(); //zip_code_empty_html_05220340071(); //res_add_empty_html_05220340071(); //dock_add_empty_html_05220340071(); //delivery_type_empty_html_05220340071(); // //$(‘#loading_gif_05220340071’).html(”); //$(‘#loading_gif_05220340071’).hide(); //$(‘#form_api_rates_05220340071’).html(”); //$(‘#form_api_rates_05220340071’).hide(); hide_me_05220340071(‘form_delivery_type_05220340071’); hide_me_05220340071(‘form_zip_05220340071’); hide_me_05220340071(‘form_res_type_05220340071’); hide_me_05220340071(‘form_dock_type_05220340071’); hide_me_05220340071(‘form_api_rates_05220340071’); hide_me_05220340071(‘form_foxy_form_05220340071’); hide_me_05220340071(‘loading_gif_05220340071’); hide_me_05220340071(‘continue_rates_05220340071’); hide_me_05220340071(‘continue_zip_05220340071’); hide_me_05220340071(‘continue_international_05220340071’); clear_me_05220340071(‘form_delivery_type_05220340071’); clear_me_05220340071(‘form_zip_05220340071’); clear_me_05220340071(‘form_res_type_05220340071’); clear_me_05220340071(‘form_dock_type_05220340071’); clear_me_05220340071(‘form_api_rates_05220340071’); clear_me_05220340071(‘form_foxy_form_05220340071’); clear_me_05220340071(‘loading_gif_05220340071’); }); }); // hide id starting with function hide_me_05220340071(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).hide(); }); } // clear id html starting with function clear_me_05220340071(hide_me_val){ $(‘[id^= “‘+hide_me_val+'”]’).each(function(){ $(this).html(”); }); } // clear residential cookie and local storage function clear_res_storage_05220340071(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_res” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_res”); }); } // clear dock type cookie and local storage function clear_dock_type_storage_05220340071(){ $.post( “/wp-content/themes/HGR/fc/post/delete_cookie.php”, { atc_cookie_name_post: “atc_dock” }) .done(function( data ) { // clear local data for immediate use localStorage.removeItem(“atc_dock”); }); } ]]]]]]>]]]]>]]>

<![CDATA[=1){ // set atc_cart_qty local val localStorage.setItem(“atc_qty”, this_atc_cart_qty); // post zip val to set cookie $.post( “/wp-content/themes/HGR/fc/post/set_cookie.php”, { atc_cookie_name_post: “atc_cart_qty”, atc_cookie_val_post: this_atc_cart_qty }) .done(function( data ) { jQuery(‘#modal_qty_05220340071’).modal(‘hide’); jQuery(‘#modal_05220340071’).modal(‘show’); }); } }); // END click continue qty function qty_empty_html_05220340071(){ // clear form zip html $(‘#form_qty_05220340071’).html(“); // populate form zip html $(‘#form_qty_05220340071’).html(`

How many would you like?(`+max_qty_avail_05220340071+` in stock)

<![CDATA[<![CDATA[]]> <![CDATA[]]> <![CDATA[]]> Watchlist <![CDATA[= 0) { // Already in favorites, send to /favorites window.location.href = “/favorites”; }else{ $.post( “/wp-content/themes/HGR/post/set-fav-cookie.php”, { sku_for_imgs: “0522-034-0071″ }) .done(function( data ) { // START Google Datalayer Push dataLayer.push({‘event’: ‘add_to_favorites_button’,’sku’: ‘0522-034-0071’, ‘page_type’: ‘search results page’,’price’: ‘623.00’,’category’: ‘Material Handling’,’brand’: ”, ‘business_vertical’: ‘H’}); // END Google Datalayer Push // START HT hit_trk(localStorage.getItem(“atc_email”), ‘hgr_101’, ‘product drawer’, ‘add to favorites’, ‘0522-034-0071’, ‘623.00’); // END HT $(‘#favorites_heart_icon_0522-034-0071_desktop’).removeClass(“fa fa-heart-o fa-heart-favorites”); $(‘#favorites_heart_icon_0522-034-0071_desktop’).addClass(“fa fa-heart fa-heart-favorites”); $(‘#favorites_a_text_0522-034-0071_desktop’).text(“Added!”); }); } }); }); ]]]]]]>]]]]>]]> Favorites Print <![CDATA[]]> <![CDATA[]]> <![CDATA[<![CDATA[]]> <![CDATA[<![CDATA[]]> <![CDATA[]]>

Home

We buy & sell used manufacturing machinery, industrial equipment and surplus items. New inventory daily and we offer a 30-day satisfaction guarantee.

If you have any question please CONTACT  Us Email us at:  [email protected] Call US :(936) 588-1888
Don’t Forget to Visit our Services 

 

For reliable and quality Managed IT Services and VoIP, Contact Precise Business Solutions 

Leave a comment

Your email address will not be published. Required fields are marked *