- Shop
- Sell Your Clubs
- About
Free Shipping On Orders $100+. New Inventory Added Daily.
-
30-Day Return Policy.
- 0 • $0
Plus -2 More
Description Golf Club Brokers Reviews
Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749
Dexterity - Right-Handed
Shaft Details - KBS Hi-Rev 2.0 105
Flex - Wedge
Loft - 50
Club Number - Gap Wedge
Item Length - 35.5"
Grip Type - Winn
Grip Condition - Good
Grip Size - Mid-Size
Gender - Men
Condition Rating - 8 Very Good
Condition Chart
10 New 9 Excellent 8 Very Good 7 Good 6 Fair 5 Poor
Brand new condition.
May have very limited use, but will still have that new luster.
Some signs of normal use, but is in great shape and has been very well maintained with only minor scratches.
Has been used with normal wear. Driver, Fairways and Hybrids may have sky marks or scratches on the crown.
Has marks and other signs of wear, but still performs like new.
Scratches, paint chips, and other marks will be visible, but it will still perform like new.
About Us Shipping Payment Returns Contact Us FAQ
We are located in Canton, GA and have been selling clubs on eBay for 14 years with 30,000 positive feedback. As you can see from our 99.9% positive feedback rating, we will do our best to make sure you are a happy customer. We realize that it is only because of you that we are in business and excellent customer service is our goal. If you are unhappy in any regard, please let us know before leaving feedback so we can make it right.
Shipping Time
Your items will be shipped out the next business day after purchase. If you purchase a club before 11am Monday through Friday, we will do our best to send it out the same day. We do not ship on weekends or national holidays. We ship from our warehouse in Canton, GA so if you are on the west coast it may take a day or two longer to receive your item. If you do not have your club after 5 business days, please contact us so we can check with the shipping company to locate your package.
Order Tracking
All tracking numbers will be sent to you once the label has been printed. It may take up to 24 hours for the tracking number to become active.
Shipping Methods
Domestic
Single clubs will be shipped by USPS Priority Mail and Iron Sets will be shipped by USPS Priority Mail or UPS Ground depending on your location.
Local Pickup
If you are a local buyer and would like to pick your item up, let us know after your purchase and we will arrange a pickup time
We accept PayPal as well as Visa, MasterCard, Discover, and AMEX.
Returns are accepted within 30 days for any reason. All returned clubs must be in the condition they were delivered in. Items not in the original condition will be subjected to a 15% restocking fee. Return shipping costs are the responsibility of the buyer unless the item is defective or damaged during shipment. If you need to return and item, please contact us.
Address
Golf Club Brokers
8014 Cumming Hwy
Suite 403-339
Canton, GA 30115
Business Hours
Monday - Friday 8AM to 5PM EST
What is the condition of the club?
The club you see in the pictures is the actual club you will receive. We do our best to accurately describe the club, but please contact us if you are unhappy with the condition.
Is the cover included?
The description will have a section that tells whether each club includes a cover. If we have the matching cover we will include it with the club.
How do I know you are a legitimate business?
Please check our eBay feedback to see our reputation. We have been selling on eBay for over 14 years and have a 99.9% feedback rating.
description
Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749
Shaft Details - KBS Hi-Rev 2.0 105
Flex - Wedge
Loft - 50
Club Number - Gap Wedge
Item Length - 35.5"
Grip Type - Winn
Grip Condition - Good
Grip Size - Mid-Size
Gender - Men
Condition Rating - 8 Very Good
Brand new condition.
May have very limited use, but will still have that new luster.
Can't quite be considered like new, but has very light wear.
Some signs of normal use, but is in great shape and has been very well maintained with only minor scratches.
Has been used, but was well taken care of with no major marks. Driver, Fairways and Hybrids may have minor sky marks.
Has marks and other signs of wear, but still performs like new.
Scratches, paint chips, and other marks will be visible, but it will still perform like new.
We are located in Canton, GA and have been selling clubs on eBay for 12 years with over 19,500 positive feedback. As you can see from our 99.9% positive feedback rating, we will do our best to make sure you are a happy customer. We realize that it is only because of you that we are in business and excellent customer service is our goal. If you are unhappy in any regard, please let us know before leaving feedback so we can make it right.
Shipping Time
Your items will be shipped out the next business day after purchase. If you purchase a club before 11am Monday through Friday, we will do our best to send it out the same day. We do not ship on weekends or national holidays. We ship from our warehouse in Canton, GA so if you are on the west coast it may take a day or two longer to receive your item. If you do not have your club after 5 business days, please contact us through eBay so we can check with the shipping company to locate your package.
Order Tracking
All tracking numbers are uploaded to eBay once the label has been printed. It may take up to 24 hours for the tracking number to become active.
Discounted Shipping
We offer combined shipping rates of $3 per additional club. Make sure you add all clubs to your cart to receive the discounted rate.
Shipping Methods
Domestic
Single clubs will be shipped by USPS Priority Mail and Iron Sets will be shipped by USPS Priority Mail or UPS Ground depending on your location.
International
All international shipping is done through the eBay Global Shipping Program. We have no control over cost or speed of the international shipping portion. We ship the item to an appointed warehouse and the rest is handled by eBay.
Local Pickup
If you are a local buyer and would like to pick your item up, let us know after your purchase and we will arrange a pickup time
We accept PayPal as well as Visa, MasterCard, Discover, and AMEX.
Returns are accepted within 30 days for any reason. All returned clubs must be in the condition they were delivered in. Items not in the original condition will be subjected to a 15% restocking fee. Return shipping costs are the responsibility of the buyer unless the item is defective or damaged during shipment. If you need to return and item, please use the eBay return feature.
If you have a question about an eBay item, please send us a message at the link below and include the SKU number shown at the end of the title for the item you are interested in.
Click Here to Send Us a Message
Address
Golf Club Brokers
8014 Cumming Hwy
Suite 403-339
Canton, GA 30115
Business Hours
Monday - Friday 8AM to 5PM EST
What is the condition of the club?
The club you see in the pictures is the actual club you will receive. We do our best to accurately describe the club, but please contact us if you are unhappy with the condition.
Is the cover included?
The description will have a section that tells whether each club includes a cover. If we have the matching cover we will include it with the club.
Will you provide a tracking number once the club ships?
Yes. The tracking number will be automatically uploaded to eBay once the item ships and you will also receive an email with the tracking number. It may take up to 24 hours for the tracking number to become active in the system.
How do I know you are a legitimate business?
Please check our eBay feedback to see our reputation. We have been selling on eBay for over 12 years and have a 99.9% feedback rating.
Recommended for the Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749
Product title
Vendor
$19.99 | $24.99
Quick Shop
Product title
Vendor
$19.99 | $24.99
Quick Shop
Product title
Vendor
$19.99 | $24.99
Quick Shop
Product title
Vendor
$19.99 | $24.99
Quick Shop
×
Please wait...
Make An Offer
Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749
$89.99
Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749
$89.99
×
Offerly Support
Don't fret! This pop up only shows up in Shopify Editor Mode. Offerly could not find your add to cart button! This can happen for one of the following reasons:
- 1. This product is sold out.
- To solve this please navigate to a different product!
2. Your Theme is custom or uses different text for the "Add to Cart" button.
- If this is the case, please contact support and we will add support for your theme!
Default Title
`); var productTitleText = [...document.getElementById('modalProductTitle').children].map(child => child.textContent.trim()).join(' / '); var productCollections = [{"id":198792020129,"handle":"all","title":"All","updated_at":"2025-01-25T04:00:46-05:00","body_html":"","published_at":"2020-06-01T13:06:41-04:00","sort_order":"created-desc","template_suffix":"","disjunctive":false,"rules":[{"column":"variant_price","relation":"greater_than","condition":"0"},{"column":"variant_inventory","relation":"greater_than","condition":"0"}],"published_scope":"global","image":{"created_at":"2024-10-30T13:17:49-04:00","alt":"All - Golf Club Brokers","width":1900,"height":924,"src":"\/\/store.golfclubbrokers.com\/cdn\/shop\/collections\/GCBLogoGoogle-600256.png?v=1730308669"}},{"id":406601400573,"handle":"best-selling-collection","title":"Best selling products","updated_at":"2025-01-25T03:56:06-05:00","body_html":null,"published_at":"2023-01-04T11:02:10-05:00","sort_order":"best-selling","template_suffix":null,"disjunctive":false,"rules":[{"column":"variant_price","relation":"greater_than","condition":"0"}],"published_scope":"web"},{"id":173740523652,"handle":"callaway","title":"Callaway","updated_at":"2025-01-25T01:39:18-05:00","body_html":"","published_at":"2020-03-04T15:51:22-05:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"title","relation":"contains","condition":"Callaway"},{"column":"variant_inventory","relation":"greater_than","condition":"0"}],"published_scope":"global","image":{"created_at":"2024-10-30T13:18:16-04:00","alt":"Callaway - Golf Club Brokers","width":1024,"height":556,"src":"\/\/store.golfclubbrokers.com\/cdn\/shop\/collections\/656294ac5d8f442ff6f71defae3aafbb-461768.png?v=1730308696"}},{"id":181558804612,"handle":"callaway-wedges","title":"Callaway Wedges","updated_at":"2025-01-25T01:39:18-05:00","body_html":"","published_at":"2020-03-31T10:27:48-04:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"title","relation":"contains","condition":"Callaway"},{"column":"title","relation":"contains","condition":"Wedge"},{"column":"variant_inventory","relation":"greater_than","condition":"0"}],"published_scope":"global","image":{"created_at":"2024-10-30T13:18:25-04:00","alt":"Callaway Wedges - Golf Club Brokers","width":400,"height":257,"src":"\/\/store.golfclubbrokers.com\/cdn\/shop\/collections\/Copy_of_2022_Models_400_x_257_px_8-387118.png?v=1730308705"}},{"id":417696121085,"handle":"gifts-50-100","title":"Gifts $50 - $100","updated_at":"2025-01-25T02:02:05-05:00","body_html":"","published_at":"2023-12-18T11:57:25-05:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"variant_price","relation":"greater_than","condition":"50"},{"column":"variant_price","relation":"less_than","condition":"101"}],"published_scope":"global"},{"id":405903048957,"handle":"latest-clubs","title":"Latest Clubs","updated_at":"2025-01-25T03:56:06-05:00","body_html":"","published_at":"2022-11-15T11:30:31-05:00","sort_order":"created-desc","template_suffix":"","disjunctive":false,"rules":[{"column":"type","relation":"equals","condition":"Sporting Goods:Golf:Golf Clubs \u0026 Equipment:Golf Clubs"}],"published_scope":"global"},{"id":406601367805,"handle":"new-collection","title":"New products","updated_at":"2025-01-25T03:56:06-05:00","body_html":null,"published_at":"2023-01-04T11:02:10-05:00","sort_order":"created-desc","template_suffix":null,"disjunctive":false,"rules":[{"column":"variant_price","relation":"greater_than","condition":"0"}],"published_scope":"web"},{"id":173402914948,"handle":"wedges","title":"Wedges","updated_at":"2025-01-25T01:39:18-05:00","body_html":"","published_at":"2020-03-03T15:18:00-05:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"title","relation":"contains","condition":"Wedge"},{"column":"variant_inventory","relation":"greater_than","condition":"0"}],"published_scope":"global","image":{"created_at":"2024-10-30T13:21:07-04:00","alt":"Wedges - Golf Club Brokers","width":2000,"height":2000,"src":"\/\/store.golfclubbrokers.com\/cdn\/shop\/collections\/CategoryWedgeImage-221410.png?v=1730308868"}}]; var offeringMatch = false; var collectionsString = ''; productCollections?.map((collection) => { collectionsString += collection.id + ','; }); var showButtonInformation = {productSelectorType: 'None', selectedProducts: ''} var autoResponseDelay = 1; var delayAutoMessage = false; var quantityInput = document.querySelector('#productQuantity') || document.querySelector('input[name="quantity"]:not(.offerInput)') || document.querySelector('.product-form__quantity') || document.querySelector('select[name="quantity"]') || document.querySelector('quantity-input'); if (quantityInput && 34290827396 != 69336465675) { var offerQuantityDiv = document.getElementById('offerQuanitityInput'); offerQuantityDiv.style.display = 'block'; quantityInput.addEventListener('input', function (event) { updateQuantity(event.target.value); }); } if (quantityInput && 34290827396 == 9177890913 && !isVisibleElement(quantityInput.parentElement)) { var offerQuantityDiv = document.getElementById('offerQuanitityInput'); offerQuantityDiv.style.display = 'none'; } var hideQuantityInput = [92120383828, 85519761744, 69336465675,61879943221,69664833775,86812131607,50712314049,51222872236,49644142759, 29972538, 55821271211, 68611277022]; if (quantityInput && hideQuantityInput.includes(34290827396)) { var offerQuantityDiv = document.getElementById('offerQuanitityInput'); offerQuantityDiv.style.display = 'none'; } var modalProductDescription = document.getElementById('modalProductDescription'); if (modalProductDescription && modalProductDescription.textContent.length > 200) { modalProductDescription.textContent = modalProductDescription.textContent.substring(0, 200) + '...'; } addButtonListenerToAllOBlocks(); mountOfferlyModalAtEndOfBody(); populateUserInformation(); fixColorOfTexts(); hidePriceForStores(); showCompareAtPrice(); document.getElementById('offerAmountInput').addEventListener('input', validateOfferAmount); document.getElementById('submitOfferButton').onclick = function(){ submitOffer(); }; document.getElementById('offerQuanitityInput').addEventListener('input', validateOfferAmount); document.addEventListener('DOMContentLoaded', function () { function usePushState(handler) { function track(fn, handler, before) { return function interceptor() { if (before) { handler.apply(this, arguments); return fn.apply(this, arguments); } else { var result = fn.apply(this, arguments); handler.apply(this, arguments); return result; } }; } var currentVariantId = null; function variantHandler() { var selectedVariantId = window.location.search.replace(/.*variant=(\d+).*/, '$1'); if (!selectedVariantId) return; if (selectedVariantId != currentVariantId) { currentVariantId = selectedVariantId; handler(selectedVariantId); } } window.history.pushState = track(history.pushState, variantHandler); window.history.replaceState = track(history.replaceState, variantHandler); window.addEventListener('popstate', variantHandler); } usePushState(function (variantId) { productVariantId = variantId; selectedVariantId = variantId; updateModalInformation(variantId); var shouldShowButton = showOButton(); var addToCartButton = findAddToCartButton(); if (shouldShowButton && !document.getElementById('offerButton') && addToCartButton) { hideAddToCartButton(); addOfferButton(); } if(!shouldShowButton && document.getElementById('offerButton')){ var offerButton = document.getElementById('offerButton'); if (offerButton){ offerButton.remove(); showAddToCartButton(); } } if (shouldShowButton && !addToCartButton) { var offerButton = document.getElementById('offerButton'); if (offerButton){ offerButton.remove(); showAddToCartButton(); } } // checkForExistinCheckOutCode(variantId); }); }); document.addEventListener('keydown', function (event) { if (event.key === 'Escape') { var modal = document.getElementById('OfferlyModalDiv'); if (modal.style.display === 'flex') { closeOfferlyModal(); } var supportModal = document.getElementById('OfferlySupportDiv'); if (supportModal.style.display === 'flex') { supportModal.style.display = 'none'; } } }); window.onclick = function (event) { if (event.target == modal) { modal.style.display = 'none'; if (Shopify.designMode) { localStorage.setItem('offerButtonClicked', 'false'); } } }; window.addEventListener('resize', function() { var offerButton = document.getElementById('offerButton'); var addToCartButton = findAddToCartButton(); if (offerButton && addToCartButton) { updateOfferButton(offerButton, addToCartButton); } }); addListenerForVariantUpdates(); function addListenerForVariantUpdates() { var oButtonBlocks = document.querySelectorAll('.oButtonBlock'); oButtonBlocks.forEach(function (oButtonBlock) { var sectionId = oButtonBlock.getAttribute('data-section-id'); var section = document.getElementById('shopify-section-'+sectionId); var productVariantIdInput = section.querySelector('.product-variant-id') var offerlyJsonProductData = JSON.parse(section.querySelector('#offerlyJsonProductData').textContent); productVariantIdInput?.addEventListener('change', function () { oButtonBlock.setAttribute('data-productvariantid', productVariantIdInput.value); var productVariantData = offerlyJsonProductData.find(function (productVariant) { return productVariant.id == productVariantIdInput.value; }); oButtonBlock.setAttribute('data-productPriceMax', productVariantData.price / 100.0); oButtonBlock.setAttribute('data-productTitle', encodeURIComponent(productVariantData.title)); oButtonBlock.setAttribute('data-productLink', oButtonBlock.getAttribute('data-productLink').replace(/(\d+)$/, productVariantIdInput.value)); oButtonBlock.setAttribute('data-variantSKU', productVariantData.sku); oButtonBlock.setAttribute('data-productVendor', productVariantData.vendor); }); }); } function checkForExistinCheckOutCode(variantID){ var storedData = localStorage.getItem('Offerly-' + variantID); var storesToNotCheck = [29972538] if (storedData && !storesToNotCheck.includes(34290827396)){ var parsedData = JSON.parse(storedData) updateModalState("Congratulations!", "Great news! Your offer was accepted. Click below to proceed to checkout with your discount applied!", "Checkout", function(){checkoutButton(parsedData.checkoutLink)} , parsedData) } } var existingOfferings = '{"autoOpenModal":false,"autoOpenModalDelay":15,"startTimerWhenInactive":false,"exitIntentModal":false,"offerings":[{"products":"280244486323,","productSelectorType":"all","automatedResponseDelay":5,"delayAutomatedResponse":false},{"id":137,"shop":"golf-brokers.myshopify.com","name":"Driver Offer","products":"173402390660,","productSelectorType":"none","delayAutomatedResponse":false,"automatedResponseDelay":5,"active":true,"createdAt":"2024-10-25T16:54:38.564Z","updatedAt":"2025-01-13T20:24:12.020Z"},{"id":138,"shop":"golf-brokers.myshopify.com","name":"Wood Offer","products":"173402521732,","productSelectorType":"collections","delayAutomatedResponse":false,"automatedResponseDelay":5,"active":true,"createdAt":"2024-10-25T16:55:28.870Z","updatedAt":"2025-01-13T20:24:12.020Z"},{"id":139,"shop":"golf-brokers.myshopify.com","name":"Hybrid Offer","products":"173402685572,","productSelectorType":"none","delayAutomatedResponse":false,"automatedResponseDelay":5,"active":true,"createdAt":"2024-10-25T16:56:00.544Z","updatedAt":"2025-01-13T20:24:12.020Z"},{"id":140,"shop":"golf-brokers.myshopify.com","name":"Wedge Offer","products":"173402914948,","productSelectorType":"none","delayAutomatedResponse":false,"automatedResponseDelay":5,"active":true,"createdAt":"2024-10-25T16:56:34.948Z","updatedAt":"2025-01-13T20:24:12.020Z"},{"id":141,"shop":"golf-brokers.myshopify.com","name":"Putter Offer","products":"173402751108,","productSelectorType":"none","delayAutomatedResponse":false,"automatedResponseDelay":5,"active":true,"createdAt":"2024-10-25T16:57:16.600Z","updatedAt":"2025-01-13T20:24:12.020Z"},{"id":142,"shop":"golf-brokers.myshopify.com","name":"Single Iron Offer","products":"173403144324,","productSelectorType":"none","delayAutomatedResponse":false,"automatedResponseDelay":5,"active":true,"createdAt":"2024-10-25T16:57:57.565Z","updatedAt":"2025-01-13T20:24:12.020Z"},{"id":162,"shop":"golf-brokers.myshopify.com","name":"Iron Set Offer","products":"173403832452,","productSelectorType":"none","delayAutomatedResponse":false,"automatedResponseDelay":5,"active":true,"createdAt":"2024-11-16T11:05:44.047Z","updatedAt":"2025-01-13T20:24:12.020Z"}]}'; function handleShowButtonInformation(data) { showButtonInformation = data; var shouldShowButton = showOButton(); if (shouldShowButton) { hideAddToCartButton(); addOfferButton(); if (showButtonInformation.exitIntentModal) { setupExitIntent(() => { openOModal(true); }); } } if (showButtonInformation.autoOpenModal && shouldShowButton) { if (showButtonInformation.startTimerWhenInactive) { inactivityAlertOfferly(showButtonInformation.autoOpenModalDelay * 1000); } else { setTimeout(function () { openOModal(true); }, showButtonInformation.autoOpenModalDelay * 1000); } } } if (existingOfferings != 'Does Not Exist') { mixpanel.track("Metafields Found", { shop: `store.golfclubbrokers.com`, }); handleShowButtonInformation(JSON.parse(existingOfferings)); } else { mixpanel.track("Metafields Missed", { shop: `store.golfclubbrokers.com`, }); fetch(`/apps/offerly-proxy/app/acceptOffers/?${new URLSearchParams({ collections: collectionsString, product: productVariantId })}`, { method: 'GET' }) .then((response) => response.json()) .then(handleShowButtonInformation) .catch((error) => { mixpanel.track("Loading Error", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, error: error }); console.error(error); }); } function mountOfferlyModalAtEndOfBody() { var modal = document.getElementById('OfferlyModalDiv'); if (modal) { document.body.appendChild(modal); } } function showCompareAtPrice() { if (false) { var compareAtPrice = document.getElementById('modalCompareAtPrice'); if (compareAtPrice) { compareAtPrice.style.display = 'block'; } } } function updateLabelsForStores(){ var storesForUpdatingLabels = [65878524168, 50712314049,59154694339,27598913611,82524504395,68350411027,29972538,67982688425,67982688425] if (storesForUpdatingLabels.includes(34290827396) ) { var offerNameLabel = document.querySelector('label.offerly-text.offerly-input-label[for="offerName"]'); var offerNameInput = document.querySelector('input.offerInput.offerly-text[name="customerName"]'); var offerEmailLabel = document.querySelector('label.offerly-text.offerly-input-label[for="offerEmail"]'); var offerEmailInput = document.querySelector('input.offerInput.offerly-text[name="customerEmail"]'); var offerAmountLabel = document.querySelector('label.offerly-text.offerly-input-label[for="offerAmount"]'); var offerAmountInput = document.querySelector('input.offerInput.offerly-text[name="offerAmount"]'); var additionalInformationLabel = document.querySelector('label.offerly-text.offerly-input-label[for="additionalInformation"]'); var additionalInformationInput = document.querySelector('textarea.offerInput.offerly-text[name="additionalTextField"]'); var phoneLabel = document.querySelector('label.offerly-text.offerly-input-label[for="offerPhone"]'); var phoneInput = document.querySelector('input.offerInput.offerly-text[name="customerPhone"]'); var offerlyHeaderStoreLogo = document.getElementById('offerlyHeaderStoreLogo'); var header = document.getElementById('offerlyModalHeader'); var modalProductTitle = document.getElementById('productTitleOfferModal'); var modalPrice = document.getElementById('modalPrice'); var modalProductDescription = document.getElementById('modalProductDescription'); var offerDescriptionDiv = document.getElementById('offerDescriptionDiv'); var image = document.getElementById('offerImage'); var submitOfferButton = document.getElementById('submitOfferButton'); if (34290827396 == 67982688425){ offerNameLabel.innerHTML = 'First name'; } if (34290827396 == 65878524168){ header.innerHTML = 'Dein Preisvorschlag'; } if (34290827396 == 68350411027){ header.innerHTML = 'Ihr Preisvorschlag' offerNameLabel.innerHTML = 'Ihr Name'; offerNameInput.placeholder = ''; offerEmailLabel.innerHTML = 'Ihre E-Mail-Adresse'; offerEmailInput.placeholder = ''; offerAmountLabel.innerHTML = 'Ihr Preisvorschlag'; offerAmountInput.placeholder = ''; phoneLabel.innerHTML = 'Ihre Mobilnummer'; phoneInput.placeholder = ''; submitOfferButton.innerHTML = 'Absenden'; } if (34290827396 == 67982688425){ offerNameInput.placeholder = 'Enter your first name'; offerNameLabel.innerHTML = 'First name'; offerEmailLabel.innerHTML = 'Email'; offerEmailInput.placeholder = 'Enter your email'; submitOfferButton.innerHTML = 'Submit Offer'; } if (34290827396 == 82524504395){ header.style.textTransform = 'uppercase' } if (34290827396 == 29972538){ header.innerHTML = 'Make A Payment'; offerAmountLabel.innerHTML = 'Payment Amount'; offerAmountInput.placeholder = 'Enter your payment amount'; image.src = 'https://cdn.shopify.com/s/files/1/1951/0265/files/ET_Logo_logobar_centered.png?v=1728047693' submitOfferButton.innerHTML = 'Send Payment'; } if(34290827396 == 50712314049){ offerNameLabel.innerHTML = 'Full Name'; offerNameInput.placeholder = 'Please enter your full name'; offerAmountLabel.innerHTML = 'Your Offer'; offerAmountInput.placeholder = 'Offer price excludes shipping'; additionalInformationLabel.innerHTML = 'Location'; phoneInput.placeholder = 'Phone number with country code'; var countrySelect = document.createElement('select'); countrySelect.id = 'OfferInput'; var placeholderOption = document.createElement('option'); placeholderOption.style.backgroundColor = '#313739'; placeholderOption.value = ''; placeholderOption.text = 'Country'; placeholderOption.disabled = true; countrySelect.appendChild(placeholderOption); additionalInformationInput.parentNode.insertBefore(countrySelect, additionalInformationInput); additionalInformationInput.remove(); var countries = ['Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi', "Côte d'Ivoire", 'Cabo Verde', 'Cambodia', 'Cameroon', 'Canada', 'Central African Republic', 'Chad', 'Chile', 'China', 'Colombia', 'Comoros', 'Congo (Congo-Brazzaville)', 'Costa Rica', 'Croatia', 'Cuba', 'Cyprus', 'Czechia (Czech Republic)', 'Democratic Republic of the Congo', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Eswatini (fmr. "Swaziland")', 'Ethiopia', 'Fiji', 'Finland', 'France', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Greece', 'Grenada', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Holy See', 'Honduras', 'Hong Kong' , 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Mauritania', 'Mauritius', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Morocco', 'Mozambique', 'Myanmar (formerly Burma)', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'North Korea', 'North Macedonia', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Palestine State', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Poland', 'Portugal', 'Qatar', 'Romania', 'Russia', 'Rwanda', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Korea', 'South Sudan', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Sweden', 'Switzerland', 'Syria', 'Tajikistan', 'Tanzania', 'Thailand', 'Timor-Leste', 'Togo', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'United States of America', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Venezuela', 'Vietnam', 'Yemen', 'Zambia', 'Zimbabwe']; countries.sort(); for (var i = 0; i < countries.length; i++) { var option = document.createElement('option'); option.style.backgroundColor = '#313739'; option.value = countries[i]; option.text = countries[i]; countrySelect.appendChild(option); } countrySelect.name = 'additionalTextField'; countrySelect.classList.add('offerInput'); countrySelect.classList.add('offerly-text'); countrySelect.value = ''; var offerQuanitityInput = document.getElementById('offerQuanitityInput'); var additionalInformationInput = document.getElementById('additionalInformationInput'); offerQuanitityInput.parentNode.insertBefore(additionalInformationInput, offerQuanitityInput); header.style.display = 'none'; offerlyHeaderStoreLogo.src = 'https://cdn.shopify.com/s/files/1/0507/1231/4049/files/smallwhitelogo.png?v=1716447954'; offerlyHeaderStoreLogo.style.display = 'flex'; var submitOfferButton = document.getElementById('submitOfferButton'); submitOfferButton.remove(); document.querySelector('.offerly-modal-content').appendChild(submitOfferButton); } if(34290827396 == 59154694339){ var offerlyModalContentGroup = document.querySelector('.offerly-modal-content-group'); offerlyModalContentGroup.style.alignItems = 'center'; var rightSide = document.getElementById('rightSide'); var productTitle = document.getElementById('modalProductTitle'); rightSide.prepend(productTitle); rightSide.style.flex = '1 1 215px'; var image = document.getElementById('offerImage'); image.style.paddingBottom = '0px'; var productTitleOfferModal = document.getElementById('productTitleOfferModal'); productTitleOfferModal.style.paddingBottom = '0px'; offerDescriptionDiv.style.display = 'block'; offerDescriptionDiv.style.width = '100%'; modalProductDescription.style.fontSize = '18px'; modalPrice.style.fontSize = '18px'; } if (34290827396 == 27598913611){ var offerSKUDiv = document.getElementById('offerSKUDiv'); offerSKUDiv.style.display = 'block'; } } } function addOfferButton() { var addToCartButton = findAddToCartButton(); if (!addToCartButton) { console.log('No add to cart button found'); return } var offerButton = document.createElement('button'); offerButton.id = 'offerButton'; var submitOfferButton = document.getElementById('submitOfferButton'); var modalAddToCartButton = document.getElementById('modalAddToCartButton'); offerButton.innerHTML = 'make an offer' == 'make an offer' ? 'Make An Offer' : 'Make An Offer'; updateOfferButton(offerButton, addToCartButton); updateOfferButton(submitOfferButton, addToCartButton); updateOfferButton(modalAddToCartButton, addToCartButton); offerButton.addEventListener('click', function (event) { event.preventDefault(); event.stopPropagation(); updateModalInformation(selectedVariantId); openOModal(); }); if (34290827396 == 73665609995){ var modalHeader = document.getElementById('offerlyModalHeader'); modalHeader.innerHTML = 'Send Enquiry'; submitOfferButton.innerHTML = 'Enquire'; } if (34290827396 == 90128974103){ var modalHeader = document.getElementById('offerlyModalHeader'); modalHeader.innerHTML = 'Make an Enquiry'; submitOfferButton.innerHTML = 'Enquire'; } mixpanel.track("Button Added", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, } ); updateLabelsForStores() var flexWrapShop = [74034315537, 20281681, 77076005182, 58405322835, 75196203307, 61769482425, 27527348276, 57320276143, 27394244673 ]; if (flexWrapShop.includes(34290827396)){ addToCartButton.parentNode.style.flexWrap = 'wrap'; } if ( 34290827396 == 20281681 || 34290827396 == 77076005182 || 34290827396 == 58405322835 || 34290827396 == 75196203307 || 34290827396 == 61769482425 || 34290827396 == 27527348276 || 34290827396 == 57320276143 ){ addToCartButton.style.marginBottom = '16px'; } if ( 34290827396 == 68129849588 ){ addToCartButton.parentNode.style.flexWrap = 'wrap'; addToCartButton.parentNode.style.display = 'flex'; addToCartButton.parentNode.style.flexDirection = 'column'; } if ( 34290827396 == 67676799256 ){ var getPlacement = document.getElementById('ProductPopup-message'); getPlacement.insertAdjacentElement('afterend', offerButton); return; } var useParentNodeShopIds = [ 67095658712, 56191680721 ,60099559673, 9238556, 65386643635, 1502598, 58408730675, 13638089, 18581729, 81888772409, 55008591957, 52291043514, 29522460808, 58351059100, 8722284, 65605828783, 80557900122, 85798322485, 89265602849, 1179122]; if (useParentNodeShopIds.includes(34290827396)) { addToCartButton.parentNode.insertAdjacentElement("afterend", offerButton); return; } if ( 34290827396 == 73305882890 || 34290827396 == 49644142759 || 34290827396 == 67902111923 || 34290827396 == 82524504395 || 34290827396 == 60743844052 || 34290827396 == 65564082233) { addToCartButton.parentNode.parentNode.insertAdjacentElement("afterend", offerButton) return; } if ( 34290827396 == 49574117544 || 34290827396 == 67113091311) { addToCartButton.parentNode.parentNode.parentNode.parentNode.insertAdjacentElement("afterend", offerButton) return; } if ( 34290827396 == 9177890913) { addToCartButton.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.insertAdjacentElement("beforeend", offerButton) return; } if ( 34290827396 == 69664833775 || 34290827396 == 65273659647 || 34290827396 == 87724163412) { addToCartButton.parentNode.insertBefore(offerButton, addToCartButton); return } if ( 34290827396 == 50712314049) { var thinkingOfSellingButton = [...document.querySelectorAll('.button.button--xl.button--outline.w-full')]; var sellingButton = thinkingOfSellingButton.find((button) => button.textContent.trim().toLowerCase().includes('thinking of selling?')); sellingButton ? sellingButton.parentNode.insertBefore(offerButton, sellingButton.nextSibling) : addToCartButton.parentNode.insertBefore(offerButton, addToCartButton.nextSibling); return } addToCartButton.parentNode.insertBefore(offerButton, addToCartButton.nextSibling); const addToCartButtonObserve = findAddToCartButton(); const offerButtonObserve = document.getElementById('offerButton'); const parentElement = addToCartButtonObserve.parentElement; var buttonsTouching = areElementsAdjacent(addToCartButton, offerButtonObserve); if (buttonsTouching) { offerButtonObserve.style.marginTop = '10px'; } } function resetStyles(element, styles) { styles.forEach(style => { element.style[style] = ''; }); } function updateOfferButton(button, addToCartButton) { if (!addToCartButton) { return; } var addToCartButtonStyle = window.getComputedStyle(addToCartButton); button.classList.add('offerButton'); button.style.backgroundColor = '#000000'; button.style.color = '#FFFFFF'; button.style.borderRadius = 'px'; button.style.setProperty('width', '100%', 'important'); button.style.height = addToCartButtonStyle.height; button.style.margin = addToCartButtonStyle.margin; button.style.padding = addToCartButtonStyle.padding; button.style.fontFamily = addToCartButtonStyle.fontFamily; button.style.fontSize = addToCartButtonStyle.fontSize; button.style.fontWeight = addToCartButtonStyle.fontWeight; button.style.letterSpacing = addToCartButtonStyle.letterSpacing; button.style.borderRadius = addToCartButtonStyle.borderRadius; button.style.border = addToCartButtonStyle.border; button.style.lineHeight = addToCartButtonStyle.lineHeight; button.style.cursor = 'pointer'; button.style.zIndex = 'auto'; button.style.textTransform = addToCartButtonStyle.textTransform; button.style.textAlign = addToCartButtonStyle.textAlign; if (addToCartButton.textContent === addToCartButton.textContent.toUpperCase()) { button.style.textTransform = 'uppercase'; } if (addToCartButton.textContent.replace(/\s/g, '').charAt(0) === addToCartButton.textContent.replace(/\s/g, '').charAt(0).toUpperCase() && addToCartButton.textContent.replace(/\s/g, '').slice(1) === addToCartButton.textContent.replace(/\s/g, '').slice(1).toLowerCase()){ button.textContent = button.textContent.charAt(0).toUpperCase() + button.textContent.slice(1).toLowerCase(); } var buttonsTouching = areElementsAdjacent(addToCartButton, button); var add10pxMarginTop = [ 67095658712, 89265602849, 34290827396, 11698208, 27340013679, 36680073355, 60743844052, 82524504395, 67902111923, 2218972, 27598913611, 60099559673, 59190870204, 55717462192, 19884211, 61020012786, 19703995, 9177890913, 63635554481, 78885716262, 18581729, 57483493549, 55218503785, 73305882890, 4411654217, 74848502074, 16867965, 49574117544, 64379584700, 54885220561, 61775872347, 2440329, 53819474108, 233242649, 72843067733, 49644142759, 26670334031, 76660179259, 55590715717, 73939091772, 5708365834, 59154694339, 83330335009, 29999070, 64795246644, 72810922327, 50319622293, 51553501368, 52950827161, 42973823127, 1179122, 581762]; if ( add10pxMarginTop.includes(34290827396) || buttonsTouching) { button.style.marginTop = '10px'; } var add10pxMarginBottom = [69664833775, 67113091311, 55008591957, 80557900122, 56191680721, 20281681]; if ( add10pxMarginBottom.includes(34290827396) ) { button.style.marginBottom = '10px'; } var noMarginBottom = [77076005182, 58405322835, 75196203307, 61769482425, 27527348276, 57320276143]; if ( noMarginBottom.includes(34290827396) ) { button.style.marginBottom = '0px'; } var add5pxMarginTop = [61879943221]; if ( add5pxMarginTop.includes(34290827396) ) { button.style.marginTop = '5px'; } var margin0px = [85798322485] if (margin0px.includes(34290827396)) { button.style.margin = '0px'; } if ( 34290827396 == 3014819906) { button.style.width = '230px'; } var sameWidthButton = [55508664503, 55218503785, 20281681, 77076005182, 58405322835, 29999070, 56208556218, 61769482425, 27527348276, 57320276143]; if ( sameWidthButton.includes(34290827396) ) { button.style.width = addToCartButtonStyle.width; } var removeWidth = [65605828783, 1179122] if (removeWidth.includes(34290827396) && button.id == 'offerButton') { button.style.width = ''; } if ( 34290827396 == 29999070 ) { button.style.padding = '0px'; } if (34290827396 == 75196203307){ button.style.width = 'fit-content'; } if ( 34290827396 == 68129849588) { button.style.gridColumn = 'span 2'; } if ( 34290827396 == 8722284) { button.style.margin = '0px'; button.style.marginTop = '10px'; } if ( 34290827396 == 2252701765){ button.style.width = '90%'; button.style.height = ''; } if ( 34290827396 == 55717462192) { button.style.maxHeight = button.style.height; button.style.flex = 'none' } if ( 34290827396 == 50712314049) { var thinkingOfSellingButton = [...document.querySelectorAll('.button.button--xl.button--outline.w-full')]; var sellingButton = thinkingOfSellingButton.find((button) => button.textContent.trim().toLowerCase().includes('thinking of selling?')); if (!sellingButton) { button.style.marginTop = '24px'; } button.classList.add('button'); button.classList.add('button--outline'); } var submitButtonShopIds = [20281681, 77076005182, 58405322835, 75196203307, 29999070, 56208556218, 61769482425, 27527348276, 57320276143]; if (submitButtonShopIds.includes(34290827396) && button.id == 'submitOfferButton') { button.style.width = '100%'; button.style.margin = '0px'; } var maxWidthButton =[55590715717, 13484519, 27394244673 ] if ( maxWidthButton.includes(34290827396) && button.id == 'offerButton') { button.style.maxWidth = addToCartButtonStyle.width; } if ( 34290827396 == 27254259764 && button.id == 'offerButton') { button.style.fontSize = 'inherit'; button.style.width = 'fit-content'; button.classList.add('btn'); } if ( 34290827396 == 34290827396) { if (button.id == 'submitOfferButton') { button.style.maxWidth = ''; button.classList.remove('btn'); } } if ( 34290827396 == 87724163412){ button.style.maxHeight = '44px'; button.style.height = '44px'; button.style.textTransform = 'uppercase'; button.style.textAlign = 'center'; button.style.fontSize = '14px'; } if ( 34290827396 == 12125098 && button.id == 'offerButton'){ button.style.padding = ''; button.style.paddingBottom = '4px'; button.style.maxWidth = '200px'; button.style.marginLeft='10px'; } if ( 34290827396 == 59154694339 && button.id == 'offerButton') { button.addEventListener('mouseover', () => { button.style.boxShadow = '0 0 10px rgb(42 49 70)'; }); button.addEventListener('mouseout', () => { button.style.boxShadow = ''; }); button.classList.add('glow-button'); } var copyButtonClasses = [19884211, 13512613, 65605828783] if (copyButtonClasses.includes(34290827396) && button.id == 'offerButton') { var classes = addToCartButton.classList; for (var i = 0; i < classes.length; i++) { button.classList.add(classes[i]); } } } function areElementsAdjacent(el1, el2) { const rect1 = el1.getBoundingClientRect(); const rect2 = el2.getBoundingClientRect(); const verticallyAdjacent = (rect1.bottom === rect2.top || rect1.top === rect2.bottom) return verticallyAdjacent;} function findAddToCartButton() { var addToCartButton = [...document.querySelectorAll('button:not(#modalAddToCartButton)')].find((button) => (button.textContent.trim().toLowerCase().includes('add to cart') || button.textContent.trim().toLowerCase().includes('add to quote') || button.textContent.trim().toLowerCase().includes('pre order') || button.textContent.trim().toLowerCase().includes('pre-order') || button.textContent.trim().toLowerCase().includes('receive a stock alert') || button.textContent.trim().toLowerCase().includes('purchase') || button.textContent.trim().toLowerCase().includes('kosárba') || button.textContent.trim().toLowerCase().includes('add to bag') || button.textContent.trim().toLowerCase().includes('add to shopping cart') || button.textContent.trim().toLowerCase().includes('add to shopping bag') || button.textContent.trim().toLowerCase().includes('add to basket') || button.textContent.trim().toLowerCase().includes('ajouter au panier') || button.textContent.trim().toLowerCase().includes('añadir al carrito') || button.textContent.trim().toLowerCase().includes('in den warenkorb') || button.textContent.trim().toLowerCase().includes('aggiungi al carrello') || button.textContent.trim().toLowerCase().includes('adicionar ao carrinho') || button.textContent.trim().toLowerCase().includes('legg til i handlekurven') || button.textContent.trim().toLowerCase().includes('lägg i varukorgen') || button.textContent.trim().toLowerCase().includes('tilføj til kurv') || button.textContent.trim().toLowerCase().includes('aggiungi alla borsa') || button.textContent.trim().toLowerCase().includes('ajouter au sac') || button.textContent.trim().toLowerCase().includes('añadir a la bolsa') || button.textContent.trim().toLowerCase().includes('der tasche hinzufügen') || button.textContent.trim().toLowerCase().includes('zum warenkorb') || button.textContent.trim().toLowerCase().includes('aggiungi al cesto') || button.textContent.trim().toLowerCase().includes('ajouter à la corbeille') || button.textContent.trim().toLowerCase().includes('in winkelwagen') || button.textContent.trim().toLowerCase().includes('aan winkelwagen toevoegen') || button.textContent.trim().toLowerCase().includes('legg i handlekurv') || button.textContent.trim().toLowerCase().includes('lisää ostoskoriin') || button.textContent.trim().toLowerCase().includes('adauga in cos') || button.textContent.trim().toLowerCase().includes('sepete ekle') || button.textContent.trim().toLowerCase().includes('enquire') || button.textContent.trim().toLowerCase().includes('acquire') || button.textContent.trim().toLowerCase().includes('do kosza') || button.textContent.trim().toLowerCase().includes('gooods') || button.textContent.trim().toLowerCase().includes('select size') || button.textContent.trim().toLowerCase().includes('einkaufswagen') || button.textContent.trim().toLowerCase().includes('įdėti į krepšelį') || button.textContent.trim().toLowerCase().includes('hozzáadás kosárhoz') || button.textContent.trim().toLowerCase().includes('dodaj do koszyka') || button.textContent.trim().toLowerCase().includes('click to pay') || button.textContent.trim().toLowerCase().includes('do koszyka') || button.textContent.trim().toLowerCase().includes('læg i indkøbskurv') || button.textContent.trim().toLowerCase().includes('agregar al carrito')) && !button.textContent.trim().toLowerCase().includes('terms of purchase') ); if (34290827396 == 61473849422) { addToCartButton = document.querySelector('form[action="/cart/add"][method="post"][is="product-form"]'); } if (34290827396 == 67275096227 && !addToCartButton){ addToCartButton = document.querySelector('button[name="add"]'); } if (34290827396 == 81252680004){ addToCartButton = document.getElementById('MainContent').querySelector('button[name="add"]'); } if (34290827396 == 68611277022){ addToCartButton = document.querySelector("[id*='ProductSubmitButton']"); } if (34290827396 == 65564082233){ addToCartButton = document.querySelector('.product__info-container.product__column-sticky .addTocart-input-card'); } if (34290827396 == 20281681) { if (addToCartButton && !addToCartButton.id.trim().toLowerCase().includes('productsubmitbutton')) { var productToCart = document.querySelector('product-form'); if (productToCart) { addToCartButton = productToCart.querySelector('button'); } } } if (34290827396 == 49574117544) { addToCartButton = document.querySelector('.product-form__submit.button.button--secondary.an-horizontal-shaking.button-text-change'); } if ( 34290827396 == 25109954659 || 34290827396 == 20375995 || 34290827396 == 90128974103, 34290827396 == 1179122) { addToCartButton = document.getElementById("addToCart"); } if ( 34290827396 == 7315363){ addToCartButton = document.querySelector('input[value="Add To Cart"]') } if ( 34290827396 == 67113091311) { if (!addToCartButton) { addToCartButton = document.querySelector('button[value="Add to cart"]'); } } if ( 34290827396 == 83549651224) { addToCartButton = document.querySelector('input[type="submit"][name="button"][value="Add to Cart"].btn-secondary'); } if ( 34290827396 == 65386643635) { addToCartButton = document.querySelector(".btn_sp.addtocart_btn.product-form__cart-submit"); } if ( 34290827396 == 78885716262) { addToCartButton = document.querySelectorAll('button[data-aid="product-form-submit-button"][data-name="product-submit"]')[1]; } if ( 34290827396 == 13638089 || 34290827396 == 86882484502 ) { addToCartButton = document.getElementById('AddToCart'); } if ( 34290827396 == 82779046162) { var potentialAddToCartButton = document.getElementById('AddToCart'); if (potentialAddToCartButton && !potentialAddToCartButton.textContent.toLowerCase().includes('ausverkauft')) { addToCartButton = potentialAddToCartButton; } } if ( 34290827396 == 3014819906 ) { addToCartButton = document.querySelector('input.add-to-cart[type="submit"]'); } if ( 34290827396 == 2252701765 ){ addToCartButton = document.querySelector('input[value="Purchase"]'); } if ( 34290827396 == 64379584700 ) { addToCartButton = document.querySelector('.btn.btn-primary.btn-lg.paira-add-to-cart.add-to-cart.margin-top-0.pull-left.display-in-b'); } if ( 34290827396 == 53819474108 ) { addToCartButton = document.querySelector('[data-js-trigger-id="add-to-cart"]'); } if ( 34290827396 == 87724163412 ){ addToCartButton = document.getElementById('dynamic-buttons-form') } if ( 34290827396 == 13484519 ) { addToCartButton = document.querySelector('.btn.btn-lg.btn-addtocart.addtocart-js'); } if ( 34290827396 == 56508154036 ) { addToCartButton = document.querySelector('form[action="/cart/add"][method="post"]'); } if (34290827396 == 66722889920){ addToCartButton = document.querySelector('button[name="add"][type="submit"]'); } if (!addToCartButton) { if (Shopify.designMode && showOButton()) { var supportModal = document.getElementById('OfferlySupportDiv'); supportModal.style.display = 'flex'; mixpanel.track("Support Modal Opened", { admin: true, shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, } ); } return null; } return addToCartButton; } function isVisibleElement(element) { computedStyle = window.getComputedStyle(element); return computedStyle.display !== 'none' && computedStyle.visibility !== 'hidden'; } function openOModal(autoOpened = false) { var modal = document.getElementById('OfferlyModalDiv'); modal.style.display = 'flex'; modal.style.animationName = 'animateopacity'; modal.style.animationDuration = '1s'; offerlyModalOpenedOnce = true; if (Shopify.designMode) { localStorage.setItem('offerButtonClicked', 'true'); } if (autoOpened) { mixpanel.track("Modal Auto-Opened", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, } ); } else { mixpanel.track("Modal Opened", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, } ); } var botContainer = document.getElementById('smart-bot-container'); var smileliteContainer = document.getElementById('smile-ui-lite-container'); if (botContainer) { botContainer.style.zIndex = '2147483645'; } if (smileliteContainer) { smileliteContainer.style.zIndex = '2147483645'; } document.getElementById('offerlyCloseButton').onclick = function () { closeOfferlyModal(); }; } function updateModalProductTitle(title) { var productTitle = document.getElementById('modalProductTitle'); var productMobileTitle = document.getElementById('mobileModalProductTitle'); if (title.includes('Default Title')){ productTitle.innerHTML = `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749
`; productMobileTitle.innerHTML = `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749
`; return `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`; } else{ productTitle.innerHTML = title; productMobileTitle.innerHTML = title; return title; } } function setupExitIntent(callback) { let hasShownExitIntent = false; function handleMouseOut(event) { if (hasShownExitIntent) { return }; // Check if the mouse leaves the window from the top, left, or right const fromTop = event.clientY <= 0; const fromLeft = event.clientX <= 0; const fromRight = event.clientX >= window.innerWidth; if ((fromTop || fromLeft || fromRight) && event.relatedTarget === null) { console.log('Exit intent detected'); hasShownExitIntent = true; callback(); } } document.addEventListener("mouseout", handleMouseOut); } function updateModalInformation(selectedVariant){ var productVariants = [{"id":45986728149245,"title":"Default Title","option1":"Default Title","option2":null,"option3":null,"sku":"187749","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749","public_title":null,"options":["Default Title"],"price":8999,"weight":907,"compare_at_price":null,"inventory_management":"shopify","barcode":"Does Not Apply","requires_selling_plan":false,"selling_plan_allocations":[]}] var productTitleBase = `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`; var productTitleDOM = document.getElementById('modalProductTitle'); var productMobileTitleDOM = document.getElementById('mobileModalProductTitle'); var productVariantSKU = document.getElementById('modalProductSKU'); var productPriceDOM = document.getElementById('modalPrice'); var productPriceMobileDOM = document.getElementById('mobileModalPrice'); var currencySymbol = `$`; var image = document.getElementById('offerImage'); var mobileImage = document.getElementById('productImageMobile'); productID = getSafeValue(`8810828431613`, null); if (productVariants){ productVariants.forEach(function (variant) { if (variant.id == selectedVariant){ selectedSKU = variant.sku; productVariantSKU.innerHTML = `SKU: ${selectedSKU}`; productURL = "/products/callaway-mack-daddy-cb-2023-50-12-wedge-right-kbs-hi-rev-2-0-steel-187749" + "?variant=" + productVariantId; var variantTitle = variant.title; var variantTitleArray = variantTitle.split(' / '); var newVariantTitle = ''; variantTitleArray.forEach(function (title, index){ newVariantTitle += `${title}
`; }); let newTitle = `${productTitleBase}
` + newVariantTitle; productTitleDOM.innerHTML = newTitle; productPriceDOM.innerHTML = currencySymbol + variant.price / 100.0; productPriceMobileDOM.innerHTML = currencySymbol + variant.price / 100.0; productTitle = updateModalProductTitle(newTitle); productTitleText = [...document.getElementById('modalProductTitle').children].map(child => child.textContent.trim()).join(' / '); priceMaxNumber = parseFloat(variant.price / 100.0).toFixed(2); compareAtPrice = parseFloat(variant.compare_at_price / 100.0).toFixed(2); if (variant?.featured_image?.src) { image.src = variant?.featured_image?.src; mobileImage.src = variant?.featured_image?.src; prodOfferImageSrc = variant?.featured_image?.src; } else { image.src = `//store.golfclubbrokers.com/cdn/shop/files/57_bc0d503c-7f1b-4c57-bf53-c40de3d62c75.jpg?v=1737731423&width=300`; mobileImage.src = `//store.golfclubbrokers.com/cdn/shop/files/57_bc0d503c-7f1b-4c57-bf53-c40de3d62c75.jpg?v=1737731423&width=300`; prodOfferImageSrc = `//store.golfclubbrokers.com/cdn/shop/files/57_bc0d503c-7f1b-4c57-bf53-c40de3d62c75.jpg?v=1737731423&width=300`; } if (34290827396 == 29972538){ image.src = `https://cdn.shopify.com/s/files/1/1951/0265/files/ET_Logo_logobar_centered.png?v=1728047693`; mobileImage.src = `https://cdn.shopify.com/s/files/1/1951/0265/files/ET_Logo_logobar_centered.png?v=1728047693`; prodOfferImageSrc = `https://cdn.shopify.com/s/files/1/1951/0265/files/ET_Logo_logobar_centered.png?v=1728047693`; } validateOfferAmount(); } }); } } function updateQuantity(quantity) { var offerQuantity = document.querySelector('#OfferInput[name="quantity"]'); offerQuantity.value = quantity; validateOfferAmount(); } function hidePriceForStores(){ var storesForHidingPrice = [8722284,71589462258] if (storesForHidingPrice.includes(34290827396) ) { var modalPrice = document.getElementById('modalPrice'); modalPrice.style.display = 'none'; } } function validateOfferAmount() { const offerInput = document.querySelector('input[name="offerAmount"]'); const priceDOM = document.getElementById('modalPrice') const currencySymbol = `$`; const offer = offerInput.value; const offerRegex = /^\d+(\.\d{1,2})?$/; const useTotalAmount = true; const inputQuantity = document.querySelector('input[name="quantity"].offerInput'); const quantity = inputQuantity ? inputQuantity.value : 1; updatedPriceMaxNumber = useTotalAmount ? priceMaxNumber * quantity : priceMaxNumber; priceDOM.innerHTML = formatPrice(updatedPriceMaxNumber); var compareAtPriceDiv = ''; var compareAtPriceWithSymbol = formatPrice(compareAtPrice); if ( false && !compareAtPrice.includes('NaN') && compareAtPrice > 0){ compareAtPriceDiv = `' + formatPrice(offer) + percentageOffText; mobileModalPrice.innerHTML = compareAtPriceDiv + '
' + formatPrice(offer) + percentageOffText; } else if (offer !== '' && issue){ modalPrice.innerHTML = compareAtPriceDiv + priceTwoDecimal + '
' + issue; mobileModalPrice.innerHTML = compareAtPriceDiv + priceTwoDecimal + '
' + issue; } else { modalPrice.innerHTML = compareAtPriceDiv + priceTwoDecimal + '
'; mobileModalPrice.innerHTML = compareAtPriceDiv + priceTwoDecimal + '
'; } if (34290827396 == 68350411027 ){ modalPrice.innerHTML = modalPrice.innerHTML.replace('$', '$ '); mobileModalPrice.innerHTML = mobileModalPrice.innerHTML.replace('$', '$ '); modalPrice.innerHTML = modalPrice.innerHTML.replace(/,/g, "'"); mobileModalPrice.innerHTML = mobileModalPrice.innerHTML.replace(/,/g, "'"); } } function formatPrice(price) { var symbolAfterStores = [88747442513]; var symbolAfter = symbolAfterStores.includes(34290827396); price = parseFloat(price).toFixed(2); price = (price.endsWith('.00') ? parseInt(price, 10) : price).toString(); if (price > 999) { price = price.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } return symbolAfter ? price + ` $` : `$` + price ;} function showSpinner(){ var rightSide = document.getElementById('rightSide'); var leftSide = document.getElementById('leftSide'); rightSide.style.display = 'none'; leftSide.style.display = 'none'; var offerlySpinner = document.getElementById('offerlySpinner'); offerlySpinner.style.display = 'flex'; } function hideSpinner(){ var rightSide = document.getElementById('rightSide'); var leftSide = document.getElementById('leftSide'); var offerlySpinner = document.getElementById('offerlySpinner'); offerlySpinner.style.display = 'none'; rightSide.style.display = 'flex'; leftSide.style.display = 'flex'; } function updateModalState(header, content, buttonText, onClick, offerData){ var modal = document.getElementById('OfferlyModalDiv'); var modalHeader = document.getElementById('offerlyModalHeader'); var inputFields = document.getElementById('offerInputFields'); var rightSide = document.getElementById('rightSide'); var modalMessage = document.getElementById('modalTextInformation'); var submitOfferButton = document.getElementById('submitOfferButton'); var offerlyHeaderStoreLogo = document.getElementById('offerlyHeaderStoreLogo'); offerlyHeaderStoreLogo.style.display = 'none'; modalHeader.style.display = 'flex'; modalMessage.textContent = content; inputFields.style.display = 'none'; rightSide.style.display = 'none'; modalHeader.innerHTML = header; submitOfferButton.textContent = buttonText; submitOfferButton.onclick = function(){ mixpanel.track("Modal Button Clicked", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, buttonText: buttonText, } ); onClick() }; if ( 34290827396 == 92120383828){ modalMessage.innerHTML = modalMessage.innerHTML + '
Si el descuento no se aplica correctamente, revisa la sección "Solución de Problemas" o finaliza el pedido a través del email de confirmación que recibirás.'; } if (offerData?.discountCode && offerData?.showAddToCart) { submitOfferButton.style.display = 'none'; var modalAddToCartButton = document.getElementById('modalAddToCartButton'); updateOfferButton(modalAddToCartButton, findAddToCartButton()); var modalAddToCartButton = document.getElementById('modalAddToCartButton'); modalAddToCartButton.style.display = 'block'; modalAddToCartButton.onclick = function() { mixpanel.track("Modal Button Clicked", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, buttonText: 'Add to Cart', }); let formData = { 'items': [{ 'id': offerData.productVariantId, 'quantity': offerData.quantity, 'discount_code': offerData.discountCode, }] }; fetch(window.Shopify.routes.root + 'cart/add.js', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(formData) }) .then(response => response.json() ) .then(data => { var discountCodes = JSON.parse(localStorage.getItem('OfferlyCodes')) || {}; discountArray = []; for (const [key, value] of Object.entries(discountCodes)) { discountArray.push(value); } fetch(`/checkout?discount=${discountArray.join(',')}`) .then(response => response.json()) .then(data => { window.location.href = '/cart'; }) .catch((error) => { console.error('Error:', error); window.location.href = '/cart'; }); }) .catch((error) => { console.error('Error:', error); window.location.href = '/cart'; }); }; } } function closeOfferlyModal(){ var modal = document.getElementById('OfferlyModalDiv'); modal.style.display = 'none'; mixpanel.track("Modal Closed", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, } ); if (Shopify.designMode) { localStorage.setItem('offerButtonClicked', 'false'); } } function backAndClearAmount(){ var offerInput = document.querySelector('input[name="offerAmount"]'); offerInput.value = ''; var modalMessage = document.getElementById('modalTextInformation'); modalMessage.textContent = ''; var inputFields = document.getElementById('offerInputFields'); var rightSide = document.getElementById('rightSide'); rightSide.style.display = 'flex'; inputFields.style.display = 'block'; var modalHeader = document.getElementById('offerlyModalHeader'); modalHeader.innerHTML = 'Make An Offer'; var submitOfferButton = document.getElementById('submitOfferButton'); var offerlyHeaderStoreLogo = document.getElementById('offerlyHeaderStoreLogo'); if (34290827396 == 50712314049) { modalHeader.display = 'none'; offerlyHeaderStoreLogo.style.display = 'flex'; } submitOfferButton.innerHTML = `Send Offer`; submitOfferButton.onclick = function(){ submitOffer(); }; } function checkoutButton(url){ window.location.href = url } function inactivityAlertOfferly(maxInactivityTime) { let timeOfferly; const resetOfferlyTimer = () => { if (timeOfferly) { clearTimeout(timeOfferly); } if (!offerlyModalOpenedOnce) { timeOfferly = setTimeout(showInactivityAlertOfferly, maxInactivityTime); } }; function showInactivityAlertOfferly() { var modal = document.getElementById('OfferlyModalDiv'); if (modal.style.display != 'flex' && !offerlyModalOpenedOnce) { clearTimeout(timeOfferly); openOModal(); } } window.onload = resetOfferlyTimer; document.onmousemove = resetOfferlyTimer; document.onkeypress = resetOfferlyTimer; document.onclick = resetOfferlyTimer; document.onscroll = resetOfferlyTimer; }; if (Shopify.designMode) { var modal = document.getElementById('OfferlyModalDiv'); var offerButtonClicked = localStorage.getItem('offerButtonClicked'); if (modal && offerButtonClicked === 'true') { modal.style.display = 'flex'; } } function populateUserInformation() { var customerName = document.querySelector('input[name="customerName"]'); var customerEmail = document.querySelector('input[name="customerEmail"]'); var customerNameValue = `` var customerEmailValue = `` if (customerName && customerNameValue) { customerName.value = customerNameValue; } if (customerEmail && customerEmailValue) { customerEmail.value = customerEmailValue; } } function showOButton(){ let showButton = false; outerLoop: for (const offering of showButtonInformation.offerings) { switch (offering.productSelectorType) { case 'all': showButton = true; autoResponseDelay = offering.automatedResponseDelay; delayAutoMessage = offering.delayAutomatedResponse; offeringMatch = offering; break outerLoop; case 'collections': for (const collection of collectionsString.split(',')) { if (offering.products.includes(collection) && collection.length > 0) { showButton = true; autoResponseDelay = offering.automatedResponseDelay; delayAutoMessage = offering.delayAutomatedResponse; offeringMatch = offering; break outerLoop; } } break; case 'products': if (offering.products.includes(productVariantId)) { showButton = true; autoResponseDelay = offering.automatedResponseDelay; delayAutoMessage = offering.delayAutomatedResponse; offeringMatch = offering; break outerLoop; } break; case 'none': showButton = false; default: showButton = false; } } var productSection = findAddToCartButton().closest('.section'); var soldOut = productSection ? [...productSection.querySelectorAll('button')].find((button) => button.textContent.trim().toLowerCase().includes('sold out') ) : null var ignoreSoldOut = [81252680004, 67982688425, 67113091311, 78280556873, 58405322835, 20281681, 61769482425, 27527348276, 57320276143]; if (soldOut && !ignoreSoldOut.includes(34290827396)) { showButton = false; console.log('Product is sold out'); } if ( 34290827396 == 86812131607 ){ var collectionsToExclude = ['477039395095']; collectionsString = collectionsString.slice(0, -1); collectionsString.split(',').forEach((collection) => { if (collectionsToExclude.includes(collection) && collection.length > 0) { showButton = false; } }); } return showButton; } function validateEmail(email) { var re = /\S+@\S+\.\S+/; return re.test(email); } function fixColorOfTexts(){ var labels = document.querySelectorAll('.offerly-input-label'); var Title = document.getElementById('offerlyModalHeader'); var modalPrice = document.getElementById('modalPrice'); var productTitle = document.getElementById('productTitleOfferModal'); var titleColor = rgbToHex(window.getComputedStyle(Title).color); var productTitleColor = rgbToHex(window.getComputedStyle(productTitle).color); var priceColor = rgbToHex(window.getComputedStyle(modalPrice).color); var modalColor = rgbToHex(window.getComputedStyle(document.querySelector('.offerly-modal-content')).backgroundColor); if (titleColor === modalColor){ Title.style.color = 'black'; } if (priceColor === modalColor){ modalPrice.style.color = 'black'; } if (productTitleColor === modalColor){ productTitle.style.color = 'black'; } labels.forEach(function(label){ var labelColor = rgbToHex(window.getComputedStyle(label).color); if (labelColor === modalColor){ if (labelColor === '#ffffff'){ label.style.color = 'black'; } else { label.style.color = 'white'; } } }); }; function rgbToHex(rgb) { let arr = rgb.match(/\d+/g); let hex = arr.map((val, index) => { if (index < 3) { return ('0' + parseInt(val).toString(16)).slice(-2); } }).join(''); return '#' + hex; } function submitOffer(){ if (productVariantId.toString().match(/[^0-9]/g)){ var productVariants = [{"id":45986728149245,"title":"Default Title","option1":"Default Title","option2":null,"option3":null,"sku":"187749","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749","public_title":null,"options":["Default Title"],"price":8999,"weight":907,"compare_at_price":null,"inventory_management":"shopify","barcode":"Does Not Apply","requires_selling_plan":false,"selling_plan_allocations":[]}] productVariants.forEach(function (variant) { if (productTitleText.includes(variant.title) || productTitleText.includes(variant.name)){ productVariantId = variant.id; } }); } var inputs = document.querySelectorAll('.offerInput'); var data = {}; var isValid = true; inputs.forEach(function (input) { if (input.style.display === 'none'){ return; } else if (input.name == 'termsCheckboxName' && !input.checked && false) { isValid = false; input.classList.add('offerInputError'); } else if (input.value.trim() === '' && input.name=='additionalTextField' && false) { isValid = false; input.classList.add('offerInputError'); } else if (input.value.trim() === '' && input.name=='customerPhone' && false) { isValid = false; input.classList.add('offerInputError'); } else if (input.value.trim() === '' && input.name!='additionalTextField' && input.name!='customerPhone') { isValid = false; input.classList.add('offerInputError'); } else if (input.name === 'offerAmount' && parseFloat(input.value) > updatedPriceMaxNumber) { isValid = false; input.classList.add('offerInputError'); } else if (input.name === 'offerAmount' && parseFloat(input.value) <= 0) { isValid = false; input.classList.add('offerInputError'); } else if(input.name == 'offerAmount' && !input.value.match(/^\d+(\.\d{1,2})?$/)){ isValid = false; input.classList.add('offerInputError'); } else if (input.name == 'customerEmail' && !validateEmail(input.value)) { isValid = false; input.classList.add('offerInputError'); } else { input.classList.remove('offerInputError'); } data[input.name] = input.value; }); delete data['termsCheckboxName']; data['quantity'] = data['quantity'] ? parseInt(data['quantity']) : 1; data['productVariantId'] = productVariantId.toString(); data['productPriceMax'] = priceMaxNumber; data['productTitle'] = productTitleText; data['offerAmount'] = true ? (parseFloat(data['offerAmount']) / parseInt(data['quantity'])).toFixed(2) : data['offerAmount'] ; data['productLink'] = productURL; data['currency'] = 'USD'; data['currencySymbol'] = '$'; data['variantSKU'] = selectedSKU?.toString(); data['productID'] = productID?.toString(); data['productVendor'] = productVendor?.toString(); data['collections'] = collectionsString; data['imageSrc'] = prodOfferImageSrc ? prodOfferImageSrc : document.getElementById('offerImage')?.src; var additionalTextInput = document.querySelector('textarea[name="additionalTextField"]'); if (additionalTextInput) { data['additionalTextField'] = additionalTextInput.value; } if (!isValid) { return; } mixpanel.track("Offer Submitted", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, offerAmount: data['offerAmount'], } ); var submitOfferButton = document.getElementById('submitOfferButton'); submitOfferButton.disabled = true; showSpinner(); fetch('/apps/offerly-proxy/app/acceptOffers?', { method: 'POST', body: JSON.stringify(data), }) .then((response) => response.json()) .then((data) => { hideSpinner(); submitOfferButton.disabled = false; var delayForAutoResponse = delayAutoMessage ? autoResponseDelay : 0; if (data.status === 'Error: Rate limit exceeded'){ updateModalState("Error Occurred!", "You have submitted too many offers too quickly. Please try again later!", "Try Again", backAndClearAmount); } if (data.offerStatus === 'Pending'){ if (34290827396 == 50712314049 ){ updateModalState("Thank you for contacting Lougher", "A member of our sales team will get back to you shortly.", "Close", closeOfferlyModal); } else if(34290827396 == 57179963555){ updateModalState("Thank you!","Please check your email regularly if your offer is accepted, declined or we have a counter offer. You can email us at tuffselectph@gmail.com or message us via viber, instagram (@tuffmanila) or the facebook page (@tuffmanila) for other inquiries. - TS Team", "Close", closeOfferlyModal); } else if (34290827396 == 58351059100){ updateModalState("Thank you for your offer!", "You should see a response within 2-10 minutes. If you do not see an email from us after a few hours, please check your junk/spam folder.", "Close", closeOfferlyModal); } else{ updateModalState("Thank You!", "We will get back to you via email shortly. Messages may end up in spam, so please check there if you do not receive a response.", "Close", closeOfferlyModal); } mixpanel.track("Offer Pending", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, offerAmount: data['offerAmount'], }); } if (data.offerStatus === 'Auto-Declined'){ mixpanel.track("Offer Auto-Declined", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, offerAmount: data['offerAmount'], }); showSpinner(); setTimeout(function(){ hideSpinner(); updateModalState("Try Again!", "Your offer was too low. Please try again!", "Try Again", backAndClearAmount ); }, delayForAutoResponse * 1000); } if (data.offerStatus === 'Auto-Accepted'){ mixpanel.track("Offer Auto-Accepted", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, offerAmount: data['offerAmount'], }); //get the discount code from the local storage var storedCodes = localStorage.getItem('OfferlyCodes'); var storedCodesObject = storedCodes ? JSON.parse(storedCodes) : {}; //update the discount code for the productVariantId storedCodesObject[data.productVariantId] = data?.discountCode; //store the discount code in the local storage as a tuple of productVarinatId and discountCode but make it queryable by the 'OfferlyCodes' //also make sure to replace the discount code if it already exists for that productVariantId localStorage.setItem('OfferlyCodes', JSON.stringify(storedCodesObject)); localStorage.setItem('Offerly-' + data.productVariantId, JSON.stringify(data)) showSpinner(); setTimeout(function(){ hideSpinner(); if (34290827396 == 29972538){ updateModalState("Proceed to Payment", "Thank you for making a payment, please click the button below to proceed to the payment page.", "Checkout", function(){checkoutButton(data.checkoutLink)}, data) } else { updateModalState("Congratulations!", "Great news! Your offer was accepted. Click below to proceed to checkout with your discount applied!", "Checkout", function(){checkoutButton(data.checkoutLink)} , data ) } }, delayForAutoResponse * 1000); } if (data.offerStatus === 'Auto-Countered'){ mixpanel.track("Offer Auto-Countered", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, offerAmount: data['offerAmount'], }); var storedCodes = localStorage.getItem('OfferlyCodes'); var storedCodesObject = storedCodes ? JSON.parse(storedCodes) : {}; storedCodesObject[data.productVariantId] = data?.discountCode; localStorage.setItem('OfferlyCodes', JSON.stringify(storedCodesObject)); localStorage.setItem('Offerly-' + data.productVariantId, JSON.stringify(data)) showSpinner(); setTimeout(function(){ hideSpinner(); updateModalState("Countered!", `Your offer was countered to ${data.currencySymbol}${parseFloat(data.counterAmount).toFixed(2)} ${data.currency}. Click below to proceed to checkout with your discount applied!`, "Checkout", function(){checkoutButton(data.checkoutLink)}, data) }, delayForAutoResponse * 1000); } }) .catch((error) => { console.error(error); mixpanel.track("Offer Error", { shop: `store.golfclubbrokers.com`, productTitle: `Callaway Mack Daddy CB 2023 50*-12 Wedge Right KBS Hi-Rev 2.0 Steel # 187749`, offerAmount: data['offerAmount'], } ); updateModalState("Error Occurred!", "An error occurred while submitting your offer. Please try again.", "Try Again", backAndClearAmount); }); } function addButtonListenerToAllOBlocks() { var offerlyBlocks = document.querySelectorAll('.oButtonBlock'); offerlyBlocks.forEach(function(offerlyBlock) { if (!offerlyBlock.dataset.listenerAdded) { offerlyBlock.addEventListener('click', function(event) { event.preventDefault(); event.stopPropagation(); var productTitleDOM = document.getElementById('modalProductTitle'); var productMobileTitleDOM = document.getElementById('mobileModalProductTitle'); var productPriceDOM = document.getElementById('modalPrice'); var currencySymbol = `$`; var image = document.getElementById('offerImage'); var mobileImage = document.getElementById('productImageMobile'); prodOfferImageSrc = offerlyBlock.getAttribute('data-imagesrc'); image.src = prodOfferImageSrc; mobileImage.src = prodOfferImageSrc; var dataTitle = offerlyBlock.getAttribute('data-producttitle'); productTitleText = decodeURIComponent(dataTitle.replace(/\+/g, ' ')); productTitleDOM.innerHTML = decodeURIComponent(dataTitle.replace(/\+/g, ' ')); productMobileTitleDOM.innerHTML = decodeURIComponent(dataTitle.replace(/\+/g, ' ')); priceMaxNumber = offerlyBlock.getAttribute('data-productpricemax'); productPriceDOM.innerHTML = currencySymbol + formatPrice(offerlyBlock.getAttribute('data-productpricemax')); productVariantId = offerlyBlock.getAttribute('data-productvariantid'); productVendor = offerlyBlock.getAttribute('data-productvendor'); selectedSKU = offerlyBlock.getAttribute('data-variantsku'); productURL = offerlyBlock.getAttribute('data-productlink'); productID = offerlyBlock.getAttribute('data-productid'); validateOfferAmount(); openOModal(); }); offerlyBlock.dataset.listenerAdded = 'true'; } }); } function observeDOMChanges() { const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.addedNodes.length) { addButtonListenerToAllOBlocks(); } }); }); observer.observe(document.body, { childList: true, subtree: true }); } document.addEventListener('DOMContentLoaded', function() { addButtonListenerToAllOBlocks(); observeDOMChanges(); }); function hideAddToCartButton() { if (false) { var addToCartButton = findAddToCartButton(); if (addToCartButton) { addToCartButton.style.display = 'none'; } } } function showAddToCartButton() { if (false) { var addToCartButton = findAddToCartButton(); if (addToCartButton) { addToCartButton.style.display = 'block'; } } }