The GolfWorks
![](https://www.facebook.com/tr?id=395211251185139&ev=PageView&noscript=1&a=plbigcommerce1.2&eid=store-9-prd-us-central1-102252025406)
The GolfWorks – The Source For All Your Golf Needs
div > div, [id^=”bc-product-“]”,”productIdSelector”:”.quickview, .quickview-alt, a[href*=”product_id”], [data-product-id]”,”findProductIdByImg”:true,”cardBodySelector”:”.card-body, .card-section–body, [data-test-id=”product-set-widget-price”], [data-test-id=”product-widget-price”]”,”cardImageSelector”:”.card-image, [data-test-id=”product-widget-image”] img, img[class^=”css-“]”,”addToCartFormSelector”:”form[data-cart-item-add]”,”productViewFile”:”products/product-view”,”imageSize”:”600×600″,”swatchesLimit”:0,”showMoreNumber”:false,”showOutStock”:false,”mergeSwatches”:false,”ignorePriceUpdate”:false,”hideIfSwatchesLessThan”:0,”ignoreOptions”:[]}; (function() { var link = document.createElement(‘link’); link.href = ‘https://dmk3z1ti4inh2.cloudfront.net/scripts/latest/productswatches.css’; link.rel = ‘stylesheet’; document.head.appendChild(link); })(); ]]> 0&&l.checkChildNodesRecursively(i.childNodes,t,n,r)},mergeArrays:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},toElementsArray:function(t){return n===t||”number”==typeof t.length&&t!==e||(t=[t]),t}}}(),c=function(){var e=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null};return e.prototype.addEvent=function(e,t,n,r){var i={target:e,selector:t,options:n,callback:r,firedElems:[]};return this._beforeAdding&&this._beforeAdding(i),this._eventsBucket.push(i),i},e.prototype.removeEvent=function(e){for(var t,n=this._eventsBucket.length-1;t=this._eventsBucket[n];n–)if(e(t)){this._beforeRemoving&&this._beforeRemoving(t);var r=this._eventsBucket.splice(n,1);r&&r.length&&(r[0].callback=null)}},e.prototype.beforeAdding=function(e){this._beforeAdding=e},e.prototype.beforeRemoving=function(e){this._beforeRemoving=e},e}(),a=function(t,r){var i=new c,o=this,a={fireOnAttributesModification:!1};return i.beforeAdding(function(n){var i,l=n.target;(l===e.document||l===e)&&(l=document.getElementsByTagName(“html”)[0]),i=new MutationObserver(function(e){r.call(this,e,n)});var c=t(n.options);i.observe(l,c),n.observer=i,n.me=o}),i.beforeRemoving(function(e){e.observer.disconnect()}),this.bindEvent=function(e,t,n){t=l.mergeArrays(a,t);for(var r=l.toElementsArray(this),o=0;o0&&l.checkChildNodesRecursively(n,t,r,i),l.callCallbacks(i,t)})}function r(e,t){return l.matchesSelector(e,t.selector)}var i={};d=new a(e,t);var o=d.bindEvent;return d.bindEvent=function(e,t,r){n===r?(r=t,t=i):t=l.mergeArrays(i,t),o.call(this,e,t,r)},d},f=new s,d=new u;t&&i(t.fn),i(HTMLElement.prototype),i(NodeList.prototype),i(HTMLCollection.prototype),i(HTMLDocument.prototype),i(Window.prototype);var h={};return r(f,h,”unbindAllArrive”),r(d,h,”unbindAllLeave”),h}}(window,”undefined”==typeof jQuery?null:jQuery,void 0); var Zonos = { api: “https://bigcommerce-v3.zonos.com/bigcommerceV3/checkout”, cid: ”, clientId: “”, cartData: { domesticShippingCharge: “”, misc1: “”, misc2: “”, misc3: “”, misc4: “”, misc5: “”, misc6: “”, shippingAmountOverride: “”, vendorPassedCurrencyCode: “USD”, customFields: “” }, checkout: function() { function n(n, i, t, e) { if (o) return o[n]; for (i = document.cookie.split(“; “), o = {}, e = i.length – 1; e >= 0; e–) t = i[e].split(“=”), o[t[0]] = t[1]; return o[n] } var o; var f = document.createElement(“form”); var d = { cartId: Zonos.cid, cartData: JSON.stringify(Zonos.cartData), country: n(“zCountry”), sh: ‘k9nvqai7wz’, site: window.location.origin ,clientId: Zonos.clientId, returnUrl: “true”}; f.setAttribute(‘method’,”post”); f.setAttribute(‘action’,Zonos.api); for (var i in d) { var c = document.createElement(“input”); c.setAttribute(‘type’,”hidden”); c.setAttribute(‘name’, i); c.setAttribute(‘value’, d[i]); f.appendChild(c); } document.body.appendChild(f); f.submit(); } }; function zonosCheckout(e) { e = (e === undefined) ? null : e; let testMode = false; if (!zonos.isDomestic() && (!testMode || urlParam(‘zonos’))) { if(e){ e.preventDefault(); } document.body.style.cursor=’wait’; try { var xhr = new XMLHttpRequest(); var i = 0; xhr.open(‘GET’, ‘/api/storefront/carts’); xhr.setRequestHeader(‘Content-Type’, ‘application/json’); xhr.onload = function () { if (xhr.status === 200) { try { var cid = JSON.parse(xhr.responseText); Zonos.cid = cid[0].id; Zonos.checkout(); } catch (e) { alert(“No items in cart found. Please add an item to cart before checkout.”); } } }; xhr.send(); xhr.onreadystatechange = function() { if(xhr.status === 0 || xhr.status === 400){//catch for cross domain issue with test sites on bigcommerce setTimeout(function(){window.location.href = “/cart.php”}, 20000); //adding a wait time for Firefox sending multiple requests at once } }; } catch (e) { alert(“No items in cart found. Please add an item to cart before checkout.”); } } }; function getButtons() { let selectors = { ‘.previewCartCheckout .button–primary’: ‘checkout’, ‘.cart-actions .button–primary’: ‘Check out’, ‘.previewCartAction-checkout’: ‘Check out now’, ‘.ProceedToCheckout .btn’: ‘Proceed To Checkout’, ‘.CheckoutLink’: ‘Checkout’, ‘.button–primary’: ‘Checkout’, ‘.button-primary’: ‘Checkout’, ‘.button’: ‘Check out’, ‘.btn’: ‘Proceed To Checkout’, ‘.CheckoutButton’: ‘Proceed To Checkout’ }; for (let key in selectors) { let button = contains(key,selectors[key]); for (i = 0; i < button.length; i++) { button[i].addEventListener("click", function(e) { zonosCheckout(e); }, true); } } }; function changeGetButtons(newSelectors) { getButtons = function() { let selectors = newSelectors; for (let key in selectors) { let button = contains(key,selectors[key]); for (i = 0; i
The GolfWorks
If you have any question please CONTACT Us
Email us at: info@discountsportsinc.com
Call US : (832) 722-8074
Don’t Forget to Visit our Shop