Superior Automotive & Powersports Products


100% FREE SHIPPING ON ALL ORDERS IN THE USA!

Customer Support:

303-386-4364

JACO Superior Products

Superior Quality Products Built to Last!

Here at JACO – we are passionate about what we do. Since 1983, our team has made it our #1 mission to produce innovative products that are  certified, performance tested, and built to last a lifetime. We absolutely obsess over offering industry-leading features that put our products lightyears ahead of the competition. Our leadership team has over 35 years of experience serving the powersports industry, and our expert engineers hold over 140 patents in the tools industry – so it’s safe to say you’re in good hands.

When you shop with us today, rest assured you’re backed by a brand that will always put you first. All of our products are designed, engineered, and performance tested at our NIST and ANSI accredited facilities in Crystal Lake, Illinois and Evergreen, Colorado. We also maintain the highest standards of quality control for each and every product we produce – which is why every order you make with us is backed by a “no questions asked” 100% Lifetime Warranty and award-winning customer support!

Shop Top-Rated Tire Pressure Gauges

Shop Award-Winning Tire Inflators

Most Recent Customer Reviews

 

American ExpressMastercardVisaDiscoverPayPalBetter Business BureauPayPal VerifiedAuthorized-netUPSFedExUSPS

Copyright © JACO. All rights reserved.

0; window.SwymPageData = {}, window.SwymProductInfo = {}; var unknown = {et: 0}; window.SwymPageData = unknown; window.SwymPageData.uri = window.swymLandingURL; }; if(window.selectCallback){ (function(){ // Variant select override var originalSelectCallback = window.selectCallback; window.selectCallback = function(variant){ originalSelectCallback.apply(this, arguments); try{ if(window.triggerSwymVariantEvent){ window.triggerSwymVariantEvent(variant.id); } }catch(err){ console.warn(“Swym selectCallback”, err); } }; })(); } window.swymCustomerId = null; var swappName = (“Watchlist” || “Watchlist”); var swymJSObject = { pid: “vNi7wQayNwtobjBc9FsDfdTZFFjUIpYCC+bcgjeILh8=” || “vNi7wQayNwtobjBc9FsDfdTZFFjUIpYCC+bcgjeILh8=”, interface: “/apps/swym” + swappName + “/interfaces/interfaceStore.php?appname=” + swappName }; window.swymJSShopifyLoad = function(){ if(window.swymPageLoad) swymPageLoad(); if(!window._swat) { (function (s, w, r, e, l, a, y) { r[‘SwymRetailerConfig’] = s; r[s] = r[s] || function (k, v) { r[s][k] = v; }; })(‘_swrc’, ”, window); _swrc(‘RetailerId’, swymJSObject.pid); _swrc(‘Callback’, function(){initSwymShopify();}); }else if(window._swat.postLoader){ _swrc = window._swat.postLoader; _swrc(‘RetailerId’, swymJSObject.pid); _swrc(‘Callback’, function(){initSwymShopify();}); }else{ initSwymShopify(); } } if(!window._SwymPreventAutoLoad) { swymJSShopifyLoad(); } window.swymGetCartCookies = function(){ var RequiredCookies = [“cart”, “swym-session-id”, “swym-swymRegid”, “swym-email”]; var reqdCookies = {}; RequiredCookies.forEach(function(k){ reqdCookies[k] = _swat.storage.getRaw(k); }); var cart_token = window.swymCart.token; var data = { action:’cart’, token:cart_token, cookies:reqdCookies }; return data; } window.swymGetCustomerData = function(){ return {status:1}; } ]]]]]]]]]]>]]]]]]]]>]]]]]]>]]]]>]]>0){-1!==$(“input[name=checkout_url]”).val().indexOf(“checkouts”)&&$(“input[name=checkout_url]”).val(“/cart”)}}function n(e){s&&(console.log(“OC:”),console.log(e)),”_CSR_TAG”in window||(window._CSR_TAG=!1) var t=window._CSR_TAG o(e,t)&&($.each(e.items,function(n,o){t?(e.items[n].properties||(e.items[n].properties=new Object),e.items[n].properties[“_Customer Tag”]=t):e.items[n].properties&&e.items[n].properties[“_Customer Tag”]&&delete e.items[n].properties[“_Customer Tag”]}),i(function(){r(e)}))}function o(e,t){var n=!1 return $.each(e.items,function(e,o){if(o.properties){var i=o.properties[“_Customer Tag”] if(i){if(!t)return void(n=!0) if(i!=t)return void(n=!0)}else if(t)return void(n=!0)}else if(t)return void(n=!0)}),s&&(n?console.log(“UC”):console.log(“NOUC”)),n}function i(e){$.ajax({type:”POST”,url:”/cart/clear.js”,success:function(){s&&console.log(“CC”),e&&e()},dataType:”json”})}function r(e){e.items.reverse(),$.each(e.items,function(e,t){l.push(t)}),a()}function a(){if(l.length){c(l.shift(),a)}else s&&(console.log(“NC:”),$.ajax({type:”GET”,url:”/cart.js”,success:function(e){console.log(e)},dataType:”json”}))}function c(e,t){$.ajax({type:”POST”,url:”/cart/add.js”,data:e,success:function(){t&&t()},dataType:”json”})}var s=!1,u=function(o){1==e(“debug_cart_handler”)&&(s=!0),t(),o.ajax({type:”GET”,url:”/cart.js”,success:function(e){n(e)},dataType:”json”})},l=[] “undefined”==typeof jQuery||parseFloat(jQuery.fn.jquery)<3.3?function(e,t){var n=document.createElement("script") n.type="text/javascript",n.readyState?n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(n.onreadystatechange=null,t())}:n.onload=function(){t()},n.src=e,document.getElementsByTagName("head")[0].appendChild(n)}("//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js",function(){jQuery331=jQuery.noConflict(!0),u(jQuery331)}):u(jQuery)}() ]]]]]]]]]]>]]]]]]]]>]]]]]]>]]]]>]]>t||(startDots7+=1e3);if (circleDots7[0][0]){window.requestAnimationFrame(dotsSevenStep);var a=[],r=[],o=[],s=[-72,32,132],c=[32,32,32];for (j = 0; circleDots7Number > j ; j++) {for (a[0]=a[1]=a[2]=.4,1==upperInteger?(a[0]=1-3*decimalRot/5,a[1]=.4+3*decimalRot/5):2==upperInteger?(a[1]=1-3*decimalRot/5,a[2]=.4+3*decimalRot/5):3==upperInteger?(a[1]=.4+3*decimalRot/5,a[2]=1-3*decimalRot/5):4==upperInteger?(a[0]=.4+3*decimalRot/5,a[1]=1-3*decimalRot/5):a[0]=1,i=0;3>i;i++)r[i]=(1-a[i])*s[i],o[i]=(1-a[i])*c[i],setAttributes(circleDots7[i][j],{ transform: ‘translate(‘+r[i]+’ ‘+o[i]+’) scale(‘+a[i]+’)’, style: ‘opacity:’+a[i]+’;’ });}}}!function(){var e=0;window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var i=(new Date).getTime(),n=Math.max(0,16-(i-e)),a=window.setTimeout(function(){t(i+n);},n);return e=i+n,a;});}();var circleDots7=[],startDots7=null;circleDots7[0]=document.getElementsByClassName(‘nc-dots-7-1’),circleDots7[1]=document.getElementsByClassName(‘nc-dots-7-2’),circleDots7[2]=document.getElementsByClassName(‘nc-dots-7-3’),circleDots7Number = circleDots7[0].length,window.requestAnimationFrame(dotsSevenStep); self.checkout({ redirect: true }); }); } function CheckoutLinks() { var checkoutLinks = document.querySelectorAll(‘a[href=”/checkout”]’); Array.prototype.forEach.call(checkoutLinks, function(link) { if (!link) return; link.addEventListener(‘click’, function(e) { e.stopPropagation(); e.preventDefault(); self.checkout({ redirect: true }); }); }); } function Discounts() { var discount = document.querySelector(‘input[name=”discount”]’); var discountCC = utils.cookie.get(‘discount_code’); // integration with CouponCountdown var discountShare = utils.cookie.get(‘ocu-share-discount’); var isPopupShown = utils.cookie.get(‘popupcookie’); if (window._chpmgr && !isPopupShown) return; // integration with chilliapps exit popup if (!discount && !discountCC && !discountShare) return; var code; if (discount) code = discount.value; if (discountCC) { code = discountCC; utils.cookie.remove(‘discount_code’); } if (discountShare) { code = discountShare; utils.cookie.remove(‘ocu-share-discount’); } var param = { name: ‘discount’, value: encodeURIComponent(code) }; var params = utils.store.get(‘params’); if (discountShare && lqd.template_name === ‘page’ || !param.value) return; // zp & shareable discount params.arr.push(param); utils.store.set(‘params’, params); } function Recharge() { var self = this; this.getCheckoutUrl = function(cart) { const gaLinker = function() { try { return ‘&’ + ga.getAll()[0].get(‘linkerParam’); } catch (e) { return ”; } }; const customerParams = function() { return lqd.customer.id ? ‘&customer_id=’ + lqd.customer.id + ‘&customer_email=’ + lqd.customer.email : ”; }; const token = cart.token || utils.cookie.get(‘cart’); const url = ‘https://checkout.rechargeapps.com/r/checkout?myshopify_domain=’ + lqd.permanent_domain + ‘&cart_token=’ + token + gaLinker() + customerParams(); return url; }; this.isSubscription = function(res) { var cart = res.cart || res.data.cart || res.data; return cart.items.some(function(item) { return item.properties && (item.properties.subscription_id || item.properties.shipping_interval_frequency); }); }; this.processCart = function() { window.reChargeProcessCart = function() { self.checkout({ redirect: true }); }; }; this.init = function(res, target) { var cart = res.cart || res.data.cart || res.data; var form = target && target.closest(‘form’); var url = (form && form.action === ‘/cart/add’) ? ‘/cart’ : self.getCheckoutUrl(cart); return url; } } function smar7() { var self = this; var isSmar7Installed = ~document.head.innerHTML.indexOf(‘bundle-upsell’); if (!isSmar7Installed) return; var ctaBtns = document.querySelectorAll(“[name=’checkout’], [href^=’/checkout’], form[action=’/checkout’] [type=’submit’], #checkout, [name=’goto_pp’], .checkout_button”); Array.prototype.forEach.call(ctaBtns, function(btn) { btn.disabled = true; }); var i = 0; var int = setInterval(function() { if ((++i && i > 7) || (window.SMAR7 && SMAR7.bundle)) { Array.prototype.forEach.call(ctaBtns, function(btn) { btn.disabled = false; }); clearInterval(int); } }, 3000); var redirect = function(discount) { var button, path, params = utils.store.get(‘params’); if (discount) { SMAR7.util.setCookie(‘smar7coupon’, discount, 3600); params.arr.push({ name: ‘discount’, value: encodeURIComponent(discount) }); } else { discount = SMAR7.bundle.helper.determineCoupon && SMAR7.bundle.helper.determineCoupon(); } if (SMAR7.paypal) { path = ‘/checkout?goto_pp=paypal_express&discount=’ + encodeURIComponent(discount); button = document.querySelector(‘[name=”goto_pp”]’); } else { path = ‘/checkout?discount=’ + encodeURIComponent(discount); button = document.querySelector( ‘[name=”checkout”], [href=”/checkout”], form[action=”/checkout”] input[type=”submit”], #checkout’ ); } utils.store.set(‘params’, params); self.checkout({ redirect: true }); }; var handle = function() { if (window.SMAR7 && SMAR7.bundle) SMAR7.bundle.redirect = redirect; }; document.addEventListener(‘click’, handle, true); }; function Integrations() { var self = this; var bold = new Bold(); var recharge = new Recharge(); this.list = { bold: { get isInstalled() { return window.BOLD && BOLD.apps_installed; }, get productOptions() { return this.isInstalled && BOLD.apps_installed[‘Product Options’]; }, get productUpsell() { return this.isInstalled && BOLD.apps_installed[‘Product Upsell’]; }, }, recharge: { isSubscriptionProduct: function(cart) { return cart.items.some(function(item) { return item.properties && (item.properties.subscription_id || item.properties.shipping_interval_frequency); }); } } }; // for future integartion this.boldUpsellCheckoutOffer = function() { if (!window.BOLD || !window.Shopify) return; var data = { data: { cart: { items: lqd.cart.items, total_price: lqd.cart.total_price } } }; return ajax.request({ method: ‘post’, url: window.BOLD.upsell.path + window.Shopify.shop + ‘/validate_checkout_offer’, data: JSON.stringify(data) }); }; this.needSkipClick = this.list.bold.productOptions || this.list.bold.productUpsell; this.start = function() { if (!lqd.upsell_cart_include_upsells) return; if (lqd.template_name !== ‘cart’) this.main(); // try { // this[(lqd.template_name === ‘cart’ ? ‘cart’ : ‘main’)](); // } catch (e) { console.warn(e); } }; this.main = function() { var handleMutation = function(mutation) { if ( mutation.type !== ‘attributes’ || mutation.target !== document.querySelector(self.ocuSelectors) || !/cart-?(popup|container|drawer)/i.test(mutation.target.id) || !/bold-upsell-modal-window/i.test(mutation.target.id) ) return; if (mutation.target.id === ‘bold-upsell-modal-window’) { return self.boldUpsellPopup(mutation.target); } var checkoutButtons = document.querySelectorAll(self.ocuSelectors); // var dataOcuCheckoutValue = checkoutButtons[0].dataset.ocuCheckout === ‘true’; var dataDisableRechargeValue = checkoutButtons[0].dataset.disableRecharge === ‘true’; var forEach = Array.prototype.forEach; forEach.call(checkoutButtons, function(item) { if (item.innerHTML === ‘Checkout’) item.removeAttribute(‘onclick’); // Integration with AceCase store }); // if (!dataOcuCheckoutValue) { // Integration with MyDietChief store // Array.prototype.forEach.call(checkoutButtons, function(item) {s // item.dataset.ocuCheckout = true; // }); // } if (lqd.disabled_by_subscription_app && dataDisableRechargeValue) return; forEach.call(checkoutButtons, function(item) { item.disableRecharge = true; }); self.cartPopup(); self.cartDrawer(mutation.target); self.checkoutLinks(); self.listenEvents(); }; var handleMutations = function(mutations) { mutations.forEach(handleMutation); }; var config = { childList: true, subtree: true, attributes: true }; new MutationObserver(handleMutations).observe(document, config); self.buyNowBtns(); self.recharge.processCart(); self.revy(); }; // this.cart = function() { // // var handleMutation = function(mutation) { // // var target = document.querySelector(self.ocuSelectors); // // if (mutation.type === ‘attributes’ && mutation.target === target) { // // self.smar7(); // // } // // }; // // var handleMutations = function(mutations) { mutations.forEach(handleMutation); }; // // var config = { // // subtree: true, // // attributes: true // // }; // // new MutationObserver(handleMutations).observe(document, config); // self.revy(); // }; this.revy = function() { if (window.RevyApp && RevyApp.events) RevyApp.events.updatedCart = []; }; this.discounts = Discounts; this.smar7 = smar7; this.isBoldRecuring = bold.isBoldRecuring; this.boldRecurring = bold.initRecurring; this.bold = bold.recurring; this.boldUpsellPopup = bold.upsellPopup; this.cartPopup = CartPopup; this.cartDrawer = CartDrawer; this.checkoutLinks = CheckoutLinks; this.handlePermalink = window.oneClickUpsellHandlePermalink = HandlePermalink.bind(this); this.buyNowBtns = BuyNowBtns; this.recharge = recharge; this.amazonPay = amazonPay; // this.amazonPay = function() { AmazonPay(self) }; this.start(); } function HistoryApi() { history.pushState = (function(f) { return function() { var result = f.apply(this, arguments); window.dispatchEvent(new Event(‘pushState’)); window.dispatchEvent(new Event(‘locationchange’)); return result; }; })(history.pushState); history.replaceState = (function(f) { return function() { var result = f.apply(this, arguments); window.dispatchEvent(new Event(‘replaceState’)); window.dispatchEvent(new Event(‘locationchange’)); return result; }; })(history.replaceState); window.addEventListener(‘popstate’, function() { window.dispatchEvent(new Event(‘locationchange’)); }); } // function Verify() { // var self = this; // var target; // this.init = function(target) { // target = target; // if (window.catchXHR) { // catchXHR = false; // XMLHttpRequest.callbacks = []; // } // if (window.beeketingWPJP) beeketingWPJP = {}; // self.checkout() // .then(self.handle) // .catch(self.helpers.redirect); // }; // this.data = function() { // var options = { // method: ‘get’, // url: self.helpers.getProxyUrl() + utils.store.get(‘lqdCart’) // }; // return ajax.request(options); // }; // this.upsells = function(res) { // if (self.integrations.recharge.isSubscription(res)) { // var url = self.integrations.recharge.init(res, target); // utils.store.set(‘redirect_url’, url); // res.data.redirect_url = url; // if (!lqd.integrate_with_recharge) { // return new Promise(function(resolve) { resolve(res); }); // } // } // res = self.cart.modify(res); // const cart = res.data; // return self._addToken(cart) // .then(function(c) { // return self._makeCheckUpsells(c, res); // }); // }; // this.handle = function(res) { // // var isAppSkipCart = lqd.skip_cart && /index|collection|product/.test(lqd.template_name); // // var isThemeSkipCart = lqd.themeSkipCart; // // if (cart.redirect_url) return location = cart.redirect_url; // if (!res.status && !lqd.themeSkipCart) return self.helpers.redirect(res); // // if (!res.status && !lqd.themeSkipCart) return location.assign(‘/cart’); // location = res.status || lqd.themeSkipCart // ? res.checkout_url // : ‘/cart’; // }; // this._makeCheckUpsells = function(cart, res) { // cart.items = self.helpers.filterCartItemFields(cart.items); // const data = { // shop_domain: lqd.current_domain, // cart: cart, // require_paypal: utils.store.get(‘requirePayPal’), // customer: { id: res.data.customer_id }, // incarts: utils.store.get(‘incarts’) // // incarts: { 47: { status: ‘declined’, shopify_variant_id: 16052480475207, quantity: 1, shown_at: Date.now() }} // // incarts: { 47: { status: ‘offered’, shopify_variant_id: 16052480475207, quantity: 1, shown_at: Date.now() }} // }; // const options = { // method: ‘post’, // url: self.helpers.getProxyUrl() + utils.store.get(‘checkUpsells’), // data: utils.serialize(data, { indices: true }) // }; // return ajax.request(options); // }; // this._addToken = function(cart) { // const store_token = utils.store.get(‘cart_token’); // return new Promise(function(resolve, reject) { // if (!cart.token && store_token) { // cart.token = store_token; // resolve(cart); // } else if (!cart.token) { // self.cart.get().then(function(res) { // cart.token = res.data.token; // resolve(cart); // }); // } else { // resolve(cart); // } // }); // } // }; const appendChain = window.Symbol ? Symbol(‘appendChain’) : ‘oneClickUpsellAppendChain’; Object[appendChain]=function(t,o){for(var n=o,e=o2nd=oLast=t instanceof this?t:new t.constructor(t),r=this.getPrototypeOf(o2nd);r!==Object.prototype&&r!==Function.prototype;r=this.getPrototypeOf(o2nd))o2nd=r;return o.constructor===String&&(n=Function.prototype,e=Function.apply(null,Array.prototype.slice.call(arguments,1)),this.setPrototypeOf(e,oLast)),this.setPrototypeOf(o2nd,n),e}; function Updater(res) { this.res = res; this.cart = res && res.data.cart; this.isCartUpdated = utils.store.get(‘cartUpdated’); this.isOfferDeclined = utils.store.get(‘offerDeclined’); this.options = { add: { method: ‘post’, url: ‘/cart/add.js’ }, change: { method: ‘post’, url: ‘/cart/change.js’ }, update: { method: ‘post’, url: ‘/cart/update.js’ } }; this.regs = { attributes: /[(.+?)]/, key: /(?:updates_(?:.*?))?(d+:w+)/, id: /(?:updates_(?:.*?))?(d+):?/ }; this.selectors = { form: ‘form[action^=”/checkout”], form[action^=”/cart”]’, attributes: ‘[name^=”attributes[“]’, currency: ‘[name=”currency”]’, updates: ‘[name^=”updates[“]’, note: ‘[name=”note”]’ }; this.data = { currency: lqd.shop_currency, attributes: {}, lineItems: [], updates: {}, changes: [], sameIds: [], note: ” }; this.payload = { updates: {}, currency: ”, note: null }; } Updater.prototype = { init: function() { if (this.isCartUpdated && !this.isOfferDeclined) return this.resolve(this.res); if (!this.form) return this.updateCurrency(); this.buildPayload(); if (this.res) return this.updateCart(); } }; const UpdaterRequests = { updateCart: function(data, isUpgrade) { const options = this._getOptions(‘update’, data, isUpgrade); const params = isUpgrade && data.changeData; const updateCart = function() { return ajax.request(options); }; return this._updateSameId(params).then(updateCart); }, addToCart: function(data) { const options = this._getOptions(‘add’, data); return ajax.request(options); }, changeCart: function(data, chain) { const options = this._getOptions(‘change’, data); const request = !chain || chain instanceof Object ? ajax.request(options) : function() { return ajax.request(options); }; return request; }, updateCurrency: function() { if (!this.needCurrencyUpdate) return this.resolve(this.res); this.getCurrency(); const options = this._getOptions(‘update’, { currency: this.data.currency }); return ajax.request(options).catch(this.resolve.bind(this, this.res)); }, _updateSameId: function(changeData) { if (!this.data.sameIds.length) return this.resolve(false); const allRequests = this._getCartChangeRequests(changeData); const requestChain = this._requestChain(allRequests); return new Promise(requestChain.bind(this)); }, _getCartChangeRequests: function(changeData) { const cb = function(acc, change) { if (!change.id && !change.line) return acc; if (changeData) { const id = changeData.id; const line = changeData.__line || changeData.line; const isUpgradeItem = change.line === line || (id && change.id === id); if (isUpgradeItem) return acc; } delete change.__variantId; acc.push(this.changeCart(change, ‘chain’)); return acc; }; return this.data.changes.reduce(cb.bind(this), []); }, _requestChain: function(allRequests) { return function(resolve, reject) { if (!allRequests.length) return resolve(false); !function createRequest() { const req = allRequests.pop(); const cb = function(res) { if (allRequests.length) return createRequest(); resolve(res); }; return req().then(cb).catch(reject); }(); } }, _getOptions: function(type, data, isUpgrade) { const options = Object.assign({}, this.options[type]); options.data = isUpgrade ? data.updateData : (data || this.payload); return options; } }; const UpdaterPayload = { buildPayload: function() { this.getUpdates(); this.getAttributes(); this.getCurrency(); this.getNote(); Object.keys(this.payload).forEach(function(key) { this.payload[key] = this.data[key]; }.bind(this)); return this.payload; }, getUpdates: function() { this.updateElements.forEach(function(item) { const isNoId = !item || (!item.dataset.id && !item.id); if (isNoId) return; const quantity = +item.value; const line = this._getLine(item); const key = this._getKey(item); const id = this._getId(item); const isIdMissing = id.toString().length i; i++) { var reg = new RegExp(params.arr[i].name); if (reg.test(params.str)) continue; params.str += params.arr[i].name + ‘=’ + params.arr[i].value; if (i + 1 !== params.arr.length) params.str += ‘&’; } utils.store.set(‘params’, params); }; this.redirect = function(res) { if (res.redirect_url) return location.assign(res.redirect_url); if (!lqd.subscription_products_size) return location.assign(res.checkout_url); const form = document.querySelector(‘form[action=”/checkout”], form[action=”/cart”]’); if (!form) return self.checkout({ redirect: true }); form.submit(); }; this.simulateSubmit = function() { var checkoutButtons = document.querySelectorAll(self.ocuSelectors); if (!checkoutButtons.length) return location = ‘/cart’; var last = Array.prototype.slice.call(checkoutButtons, -1)[0]; last.dispatchEvent(new MouseEvent(‘click’)); }; this.simulateDocumentClick = function() { var event = new Event(‘click’); var target = document.createElement(‘button’); target.type = ‘submit’; target.name = ‘checkout’; Object.defineProperty(event, ‘target’, { value: target }); document.dispatchEvent(event); }; this.preventMouseDown = function(e) { e.preventDefault(); e.stopPropagation(); // e.stopImmediatePropagation(); }; this.payPal = function(el) { if (el.name !== ‘goto_pp’ || el.value !== ‘paypal_express’) return; var params = utils.store.get(‘params’); params.arr.push({ name: el.name, value: el.value }); utils.store.set(‘requirePayPal’, true); utils.store.set(‘params’, params); }; this.filterFields = function(cart) { var needed_cart_fileds = utils.store.get(‘neededCartFileds’); var needed_cart_items_fields = utils.store.get(‘neededCartItemsFields’); cart = utils.filterObject(cart, needed_cart_fileds); cart.items = cart.items.map(function(item) { return utils.filterObject(item, needed_cart_items_fields); }); return cart; }; this.filterCartItemFields = function(items) { return items.map(function(item) { return Object.keys(item).reduce(function(acc, key) { if (key === ‘product_description’) return acc; acc[key] = item[key]; return acc; }, {}); }); }; this.getProxyUrl = function() { return lqd.proxy_url || utils.store.get(‘proxy’); }; this.checkSelector = function(target) { if (target.dataset.ocuCheckout === ‘true’) return target; const checkoutButtons = document.querySelectorAll(self.ocuSelectors); const isInclude = Array.prototype.some.call(checkoutButtons, function(item) { return item === target; }); const isCartContentParent = target.closest(‘.cart_content’) && target.closest(‘form[action=”/checkout”] [type=”submit”]’); const isCartTemplate = lqd.template_name === ‘cart’ && target.closest(‘form[action=”/cart”] [type=”submit”]’); const isCartAction = target.closest(self.ocuSelectors) || isCartContentParent || isCartTemplate; const notIncartUpsell = !target.closest(‘#nudge-offer’); // check if triggered Incart Upsell widget triggered const addToCartButton = (lqd.template_name === ‘product’ && !target.closest(‘form[action$=”/cart/add”]’)) && (((target.name === ‘add’ && target.type === ‘submit’) ? target : null) || (target.closest(‘[name=”add”]’)) && target.closest(‘[type=”submit”]’)); const parent = !isInclude && (isCartAction || target.closest(‘[name=”checkout”]’)) || addToCartButton; if ((isInclude || parent) && notIncartUpsell) return isInclude ? target : parent; }; this.checkDirectCheckoutButtons = function(target) { return //checkout/.test(target.onclick && target.onclick.toString()) }; this.checkAddToCart = function(target) { if (target.closest(‘form[action=”/cart/add”]’)) return true; }; this.zpPreventRedirect = function(target) { const condition = target.dataset.type === ‘crm_dest’ || target.dataset.zpProductRedirectLink === ” || target.dataset.zpAddToCart === ” || target.closest(‘[data-type=”crm_dest”]’) || target.closest(‘[data-zp-product-redirect-link]’) || target.closest(‘[data-zp-add-to-cart]’); if (condition) return true; }; this.isOfferProduct = function() { return lqd.cart_variants_json.some(function(item) { return item.properties && item.properties._ocu_offer_id; }); }; this.addBuyXGetYDiscount = function(res) { var discounts = res.data.items.reduce(function(acc, variant) { if (!variant.discounts[0]) return acc; let item = { item_key: variant.key, discount: variant.discounts, }; if (variant.line_level_discount_allocations[0]) item.discount_data = variant.line_level_discount_allocations; acc.push(item); return acc; }, []); if (discounts.length) res.data.per_item_discounts = discounts; return res; }; this.isBuyNow = function(e) { const selectors = utils.store.get(‘classList’); return e.target.classList.contains(selectors.buyNow) && !e.target.classList.contains(selectors.buyNowBranded); }; } [Helpers, Integrations, Cart, PublicMethod, SkipCart, BuyNow].forEach(function(item) { Object.setPrototypeOf(item.prototype, Application.prototype); }); const script = document.createElement(‘script’); document.head.appendChild(script); script.src = ocuCdn + ‘/vendor/axios.min.js’; script.onload = function() { if (window.axios) return new Application(); if (window.require) { require([ocuCdn + ‘/vendor/axios.min.js’], function(e) { window.axios = e; new Application(); }); } }; function requireOptionSelectors() { if (window.Shopify && Shopify.OptionSelectors) return; const s = document.createElement(‘script’); document.head.appendChild(s); s.src = OCUIncart.option_selection; } function Store() { var _private = { store: { ocuSelectors: ‘[name=”checkout”], [href^=”/checkout”], form[action^=”/checkout”] [type=”submit”], form[action$=”/cart”] [type=”submit”], #checkout, [name=”goto_pp”], .checkout_button, .checkout-button, [value=”Checkout”], .cart-button-checkout’, addToCartButton: ‘[name=”add”]’, proxy: ‘/apps/secure-checkout’, lqdCart: ‘/upsellapp_cart’, checkUpsells: ‘/check_upsells’, neededCartFileds: [‘token’,’note’,’attributes’,’items’, ‘currency’, ‘cart_level_discount_applications’], neededCartItemsFields: [‘product_id’,’variant_id’,’quantity’,’grams’,’price’,’line_price’,’title’,’properties’,’vendor’,’sku’,’key’], permalink: /cart/(d+:d+(?:,d+:d+)*)(?:[?&]discount=([-w! %205]+))*/, isAddToCartClicked: false, cartChanged: false, cartUpdated: false, requirePayPal: false, checkoutButtonState: false, submitted: false, amazonPayInitiated: false, redirect_url: null, offer: null, offerDeclined: false, incarts: {}, tags: [], isPermalinkHandling: false, cart_token: null, classList: { buyNow: ‘shopify-payment-button__button’, buyNowBranded: ‘shopify-payment-button__button–branded’ }, params: { str: ”, arr: [] }, fallback: { timeout: 15000, id: 0 }, XHR: { send: XMLHttpRequest.prototype.send } }, event: function(e) { return new Event(‘store:’ + e); }, emit: function(e) { document.dispatchEvent(this.event(e)); } }; this.get = function(key) { return _private.store[key]; }; this.set = function(key, val) { if (!_private.store.hasOwnProperty(key)) return console.error(‘Unavailable key! ‘, key); _private.emit(key); _private.store[key] = val; }; this.listen = function(e) { return new Promise(function(resolve) { document.addEventListener(‘store:’ + e, resolve); }); }; } }(); ]]]]]]]]]]>]]]]]]]]>]]]]]]>]]]]>]]>

Source

Leave a Reply

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