×
Add to Wishlist
Select Preferences
×
Please wait...
Make An Offer
Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap
$629.00
Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap
$629.00
×
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!
Burnt Biscuit Blonde-R | 10/16/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.
`); var productTitleText = [...document.getElementById('modalProductTitle').children].map(child => child.textContent.trim()).join(' / '); var productCollections = [{"id":265836691536,"handle":"all-products-excluding-route","title":"All Products Excluding Route","updated_at":"2024-11-29T03:10:15-08:00","body_html":"","published_at":"2023-02-06T12:38:32-08:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"type","relation":"not_equals","condition":"Insurance"},{"column":"variant_price","relation":"greater_than","condition":"0"}],"published_scope":"web"},{"id":266284990544,"handle":"all-products-excluding-route-and-clearance","title":"All Products Excluding Route and Clearance","updated_at":"2024-11-29T03:10:15-08:00","body_html":"","published_at":"2023-05-09T13:04:12-07:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"title","relation":"not_contains","condition":"clearance"},{"column":"type","relation":"not_equals","condition":"Insurance"}],"published_scope":"web"},{"id":266734764112,"handle":"all-products-excluding-route-clearance-and-special-offers","title":"All products excluding Route Clearance and Special Offers and re:do","updated_at":"2024-11-29T03:10:15-08:00","body_html":"","published_at":"2023-08-20T14:04:00-07:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"title","relation":"not_contains","condition":"clearance"},{"column":"type","relation":"not_contains","condition":"Insurance"},{"column":"vendor","relation":"not_contains","condition":"Andrea Carlson"},{"column":"title","relation":"not_contains","condition":"Special Deal!"},{"column":"title","relation":"not_contains","condition":"Try Risk Free"}],"published_scope":"web"},{"id":9806379,"handle":"our-entire-wig-collection","updated_at":"2024-11-29T02:15:05-08:00","published_at":"2013-04-20T21:02:00-07:00","sort_order":"manual","template_suffix":"","published_scope":"web","title":"All Wigs","body_html":"","image":{"created_at":"2016-11-19T18:33:51-08:00","alt":"BelleTress Wigs","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/Katie-Holmes-Classic-Short-Bob-Haircut-for-2015.jpg?v=1672430038"}},{"id":269671497808,"handle":"belle-tress-wigs-and-toppers","title":"BelleTress Wigs and Toppers","updated_at":"2024-11-28T17:40:18-08:00","body_html":"\u003ch6 style=\"text-align: center;\" data-mce-fragment=\"1\" data-mce-style=\"text-align: left;\"\u003e\u003cem\u003e\u003cspan style=\"color: #c68e8d;\"\u003eProcessing times for BelleTress may be longer than usual. We appreciate your patience. If you need your product swiftly, please select expedited shipping at checkout.\u003c\/span\u003e\u003c\/em\u003e\u003c\/h6\u003e\n\u003c!----\u003e","published_at":"2024-05-26T10:32:52-07:00","sort_order":"alpha-asc","template_suffix":"","disjunctive":false,"rules":[{"column":"vendor","relation":"equals","condition":"BelleTress"},{"column":"title","relation":"not_contains","condition":"Open Box"},{"column":"title","relation":"not_contains","condition":"Special"}],"published_scope":"web","image":{"created_at":"2024-07-14T15:42:59-07:00","alt":"BelleTress Wigs","width":600,"height":800,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/BelleTress_a6364221-738c-491c-8e06-f02fa5941836.png?v=1726698980"}},{"id":266724966480,"handle":"belletress-wigs-lux-collection","updated_at":"2024-11-27T23:45:09-08:00","published_at":"2023-08-17T14:57:59-07:00","sort_order":"created-desc","template_suffix":"","published_scope":"web","title":"BelleTress Wigs | Lux Collection","body_html":"\u003cdiv style=\"text-align: center;\" data-mce-fragment=\"1\"\u003eThe LUX Collection\u003c\/div\u003e\n\u003cdiv style=\"text-align: center;\" data-mce-fragment=\"1\"\u003e\u003c\/div\u003e\n\u003cdiv style=\"text-align: center;\" data-mce-fragment=\"1\"\u003eBelleTress brings you the Lux Collection! It features 100% hand-tied wigs in 12 brand-new colors. You can expect the same luxurious BelleTress Heat-Friendly fiber with uber-premium, Ear-To-Ear lace fronts, the most comfortable caps, special multi-directional ventilation, a unique knotting process, and a full monofilament top.\u003c\/div\u003e","image":{"created_at":"2024-03-23T13:55:40-07:00","alt":"BelleTress Wigs | LUX Collection","width":720,"height":1079,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/BELLA__shaken_oatmilk_blonde-R_2.jpg?v=1711227340"}},{"id":9509416,"handle":"lace-front-wigs","updated_at":"2024-11-29T02:15:05-08:00","published_at":"2013-03-26T12:05:00-07:00","sort_order":"alpha-asc","template_suffix":"","published_scope":"web","title":"Lace Front Wigs","body_html":"\u003cp style=\"text-align: center;\"\u003eWigStudio1.com features the largest selection of wigs and hair pieces from the most popular designers. We provide the highest level of customer service, as each of our clients are beautifully unique.\u003c\/p\u003e\n\u003c!----\u003e","image":{"created_at":"2015-07-03T16:29:13-07:00","alt":null,"width":800,"height":1200,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/Adriana_4_27_30_Alternate1.jpg?v=1435966153"}},{"id":262100680784,"handle":"average-cap-size-wigs","updated_at":"2024-11-29T02:15:05-08:00","published_at":"2021-11-03T21:18:43-07:00","sort_order":"alpha-asc","template_suffix":"","published_scope":"web","title":"Wigs | Average Cap Size","body_html":"\u003cp style=\"text-align: center;\"\u003eWig Studio 1 features a very large selection of average cap sizes. Brands that feature average size caps but tend to run slightly larger or roomier are \u003ca href=\"https:\/\/www.wigstudio1.com\/collections\/estetica-wigs\" title=\"Estetica Wigs\" target=\"_blank\"\u003eEstetica\u003c\/a\u003e and \u003ca href=\"https:\/\/www.wigstudio1.com\/collections\/belletress-cafe-collection\" title=\"BelleTress Wigs\" target=\"_blank\"\u003eBelleTress\u003c\/a\u003e. For brands that tend to run slightly smaller, you may like \u003ca href=\"https:\/\/www.wigstudio1.com\/collections\/noriko-collection\" title=\"Noriko Wigs\" target=\"_blank\"\u003eNoriko\u003c\/a\u003e, \u003ca href=\"https:\/\/www.wigstudio1.com\/collections\/amore-wigs\" title=\"Amore Wigs\" target=\"_blank\"\u003eAmore\u003c\/a\u003e or \u003ca href=\"https:\/\/www.wigstudio1.com\/collections\/ellen-wille-wigs-and-toppers\" title=\"Ellen Wille Wigs\" target=\"_blank\"\u003eEllen Wille\u003c\/a\u003e Wigs.\u003cbr\u003e\u003c\/p\u003e","image":{"created_at":"2021-11-13T20:14:21-08:00","alt":"Wigs | Average Cap Size","width":600,"height":757,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/Amanda_FS24_102S12_Main__70329.1632148499_600x_f9c4299e-6c15-494f-a840-b2e911723b95.jpg?v=1636863262"}},{"id":9553728,"handle":"monofilament-wigs","updated_at":"2024-11-29T01:40:04-08:00","published_at":"2013-03-26T12:07:00-07:00","sort_order":"alpha-asc","template_suffix":"","published_scope":"web","title":"Wigs | Full Monofilament Top","body_html":"","image":{"created_at":"2015-07-03T16:28:27-07:00","alt":null,"width":406,"height":780,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/Allure_Alternate_22F16.jpg?v=1435966107"}},{"id":9517718,"handle":"heat-defiant-wigs","updated_at":"2024-11-29T02:15:05-08:00","published_at":"2013-03-26T12:05:00-07:00","sort_order":"alpha-asc","template_suffix":"","published_scope":"web","title":"Wigs | Heat Friendly Synthetic","body_html":"\n\u003cp style=\"text-align: center;\"\u003e\u003cspan data-mce-fragment=\"1\"\u003eWig Studio 1 features an extensive line of heat resistant wigs designed to give you the power to reinvent your look every day. Flat iron, crimp and curl your heat resistant synthetic wigs just like human hair!\u003c\/span\u003e\u003c\/p\u003e","image":{"created_at":"2015-07-03T16:43:32-07:00","alt":null,"width":800,"height":1200,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/Drew_14_26_Alternate4.jpg?v=1435967012"}},{"id":9777103,"handle":"shop-short-length-wigs","updated_at":"2024-11-29T02:15:05-08:00","published_at":"2013-04-17T12:19:00-07:00","sort_order":"alpha-asc","template_suffix":"","published_scope":"web","title":"Wigs | Short Length","body_html":"\u003cp\u003eWigStudio1.com features a large selection of Short Length Wigs for you to choose from. These wigs are designed with the highest quality by the most respected manufacturers.\u003c\/p\u003e","image":{"created_at":"2015-07-03T17:26:26-07:00","alt":null,"width":800,"height":1200,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/Robin_12FS8_Main.jpg?v=1435969586"}},{"id":262100418640,"handle":"wigs-wavy","updated_at":"2024-11-29T01:40:13-08:00","published_at":"2021-11-03T20:36:46-07:00","sort_order":"best-selling","template_suffix":"","published_scope":"web","title":"Wigs | Wavy","body_html":"\u003cp\u003e\u003cspan\u003eThis collection features wigs that are wavy in texture. Please note that curl or wave can be added to heat friendly synthetic hair as well as human hair \/ heat friendly synthetic blends and 100% human hair styles, allowing you to change your look to suit your mood. \u003c\/span\u003e\u003c\/p\u003e"},{"id":364199305,"handle":"womens-wigs","updated_at":"2024-11-29T02:15:05-08:00","published_at":"2017-03-12T20:00:00-07:00","sort_order":"best-selling","template_suffix":"","published_scope":"web","title":"Women's Wigs","body_html":"","image":{"created_at":"2018-03-03T14:27:32-08:00","alt":"Rene of Paris Wigs","width":525,"height":700,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/collections\/DAKOTA.png?v=1520116052"}},{"id":263899054160,"handle":"womens-wigs-2","title":"Women's Wigs","updated_at":"2024-11-29T03:10:15-08:00","body_html":"","published_at":"2022-08-16T10:18:19-07:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"title","relation":"not_contains","condition":"clearance"},{"column":"title","relation":"not_contains","condition":"men's"},{"column":"title","relation":"not_contains","condition":"children's"},{"column":"title","relation":"not_contains","condition":"topper"},{"column":"title","relation":"contains","condition":"wig"},{"column":"type","relation":"contains","condition":"Wig"},{"column":"title","relation":"not_contains","condition":"discontin"},{"column":"title","relation":"not_contains","condition":"duplicat"},{"column":"title","relation":"not_contains","condition":"overstoc"},{"column":"title","relation":"not_contains","condition":"ring"},{"column":"title","relation":"not_contains","condition":"closeo"},{"column":"title","relation":"not_contains","condition":"halloween"},{"column":"title","relation":"not_contains","condition":"costume"},{"column":"title","relation":"not_contains","condition":"Steals \u0026 Deals"}],"published_scope":"web"}]; 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 && 2218972 != 69336465675) { var offerQuantityDiv = document.getElementById('offerQuanitityInput'); offerQuantityDiv.style.display = 'block'; quantityInput.addEventListener('input', function (event) { updateQuantity(event.target.value); }); } if (quantityInput && 2218972 == 9177890913 && !isVisibleElement(quantityInput.parentElement)) { var offerQuantityDiv = document.getElementById('offerQuanitityInput'); offerQuantityDiv.style.display = 'none'; } var hideQuantityInput = [85519761744, 69336465675,61879943221,69664833775,86812131607,50712314049,51222872236,49644142759, 19510265, 29972538, 55821271211, 68611277022]; if (quantityInput && hideQuantityInput.includes(2218972)) { var offerQuantityDiv = document.getElementById('offerQuanitityInput'); offerQuantityDiv.style.display = 'none'; } var modalProductDescription = document.getElementById('modalProductDescription'); // if modalProductDescription is over 400 characters truncate it if (modalProductDescription && modalProductDescription.textContent.length > 200) { modalProductDescription.textContent = modalProductDescription.textContent.substring(0, 200) + '...'; }// fin 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) { //modern themes use pushstate to track variant changes without reload 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 = showButton(); 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(); } } }); }); document.addEventListener('keydown', function (event) { if (event.key === 'Escape') { // Use "Escape" for modern browsers 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(); //get all oButtonBlock elements and add event listeners to them function addListenerForVariantUpdates() { var oButtonBlocks = document.querySelectorAll('.oButtonBlock'); oButtonBlocks.forEach(function (oButtonBlock) { //get the section id from the data-section-id attribute var sectionId = oButtonBlock.getAttribute('data-section-id'); // get the section element var section = document.getElementById('shopify-section-'+sectionId); // get the section element and find the input within it with the class product-variant-id var productVariantIdInput = section.querySelector('.product-variant-id') var offerlyJsonProductData = JSON.parse(section.querySelector('#offerlyJsonProductData').textContent); //add and event listener to the productVariantIdInput productVariantIdInput?.addEventListener('change', function () { //update the data-product-variant-id attribute of the oButtonBlock oButtonBlock.setAttribute('data-productvariantid', productVariantIdInput.value); //loop through the offerlyJsonProductData and find the productVariantId that matches the productVariantIdInput value var productVariantData = offerlyJsonProductData.find(function (productVariant) { return productVariant.id == productVariantIdInput.value; }); //update the data-product-price attribute of the oButtonBlock 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); }); }); } fetch(`/apps/offerly-proxy/app/acceptOffers/?${new URLSearchParams({ collections: collectionsString, product: productVariantId })}`, { method: 'GET' }) .then((response) => response.json()) .then((data) => { showButtonInformation = data; var shouldShowButton = showButton(); 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); } } }) .catch((error) => { mixpanel.track("Loading Error", { shop: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, 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 = [50712314049,59154694339,27598913611,82524504395,19510265,68350411027,29972538,67982688425] //if store not in storesForUpdatingLabels if (storesForUpdatingLabels.includes(2218972) ) { 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 (2218972 == 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 (2218972 == 67982688425){ offerNameLabel.innerHTML = 'Enter your first name'; offerEmailLabel.innerHTML = 'Enter your email'; submitOfferButton.innerHTML = 'Submit Offer'; } if (2218972 == 82524504395){ //modify the header to be all caps header.style.textTransform = 'uppercase' // header.style.textTransform = 'uppercase !important'; } if (2218972 == 19510265){ 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 (2218972 == 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(2218972 == 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'; //change additionalInformation Input to a dropdown with countries var countrySelect = document.createElement('select'); //make the background a dark color //change the placeholder to country countrySelect.id = 'OfferInput'; var placeholderOption = document.createElement('option'); placeholderOption.style.backgroundColor = '#313739'; placeholderOption.value = ''; placeholderOption.text = 'Country'; placeholderOption.disabled = true; countrySelect.appendChild(placeholderOption); //add it to where additionalInformationInput is additionalInformationInput.parentNode.insertBefore(countrySelect, additionalInformationInput); additionalInformationInput.remove(); //add options to the select 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'); //make inital value empty countrySelect.value = ''; var offerQuanitityInput = document.getElementById('offerQuanitityInput'); var additionalInformationInput = document.getElementById('additionalInformationInput'); //rearange the order of the inputs make sure #offerAmountInput is after #additionalInformationInput offerQuanitityInput.parentNode.insertBefore(additionalInformationInput, offerQuanitityInput); //make header display none 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'; //move submitOfferButton to be whole bottom var submitOfferButton = document.getElementById('submitOfferButton'); //remove it from the dom submitOfferButton.remove(); //add it as the last item in offerly-modal-content-group document.querySelector('.offerly-modal-content').appendChild(submitOfferButton); } if(2218972 == 59154694339){ // get offerly-modal-content-group and alignItems to center var offerlyModalContentGroup = document.querySelector('.offerly-modal-content-group'); offerlyModalContentGroup.style.alignItems = 'center'; // get rightSide and set width to 100% var rightSide = document.getElementById('rightSide'); // take id offerlyModalHeader and move it to the right side 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'; // get description and set display to block offerDescriptionDiv.style.display = 'block'; offerDescriptionDiv.style.width = '100%'; modalProductDescription.style.fontSize = '18px'; modalPrice.style.fontSize = '18px'; } if (2218972 == 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 (2218972 == 73665609995){ var modalHeader = document.getElementById('offerlyModalHeader'); modalHeader.innerHTML = 'Send Enquiry'; submitOfferButton.innerHTML = 'Enquire'; } if (2218972 == 90128974103){ var modalHeader = document.getElementById('offerlyModalHeader'); modalHeader.innerHTML = 'Make an Enquiry'; submitOfferButton.innerHTML = 'Enquire'; } mixpanel.track("Button Added", { shop: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, } ); updateLabelsForStores() var flexWrapShop = [74034315537, 20281681, 77076005182, 58405322835, 75196203307, 61769482425, 27527348276, 57320276143, 27394244673 ]; if (flexWrapShop.includes(2218972)){ addToCartButton.parentNode.style.flexWrap = 'wrap'; } if ( 2218972 == 20281681 || 2218972 == 77076005182 || 2218972 == 58405322835 || 2218972 == 75196203307 || 2218972 == 61769482425 || 2218972 == 27527348276 || 2218972 == 57320276143 ){ addToCartButton.style.marginBottom = '16px'; } if ( 2218972 == 68129849588 ){ addToCartButton.parentNode.style.flexWrap = 'wrap'; addToCartButton.parentNode.style.display = 'flex'; addToCartButton.parentNode.style.flexDirection = 'column'; } if ( 2218972 == 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]; if (useParentNodeShopIds.includes(2218972)) { addToCartButton.parentNode.insertAdjacentElement("afterend", offerButton); return; } if ( 2218972 == 73305882890 || 2218972 == 49644142759 || 2218972 == 67902111923 || 2218972 == 82524504395 || 2218972 == 60743844052 || 2218972 == 65564082233) { addToCartButton.parentNode.parentNode.insertAdjacentElement("afterend", offerButton) return; } if ( 2218972 == 49574117544 || 2218972 == 67113091311) { addToCartButton.parentNode.parentNode.parentNode.parentNode.insertAdjacentElement("afterend", offerButton) return; } if ( 2218972 == 9177890913) { addToCartButton.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.insertAdjacentElement("beforeend", offerButton) return; } if ( 2218972 == 69664833775 || 2218972 == 65273659647 || 2218972 == 87724163412) { addToCartButton.parentNode.insertBefore(offerButton, addToCartButton); return } if ( 2218972 == 50712314049) { // find the button on the page that says "thinking of selling?" var thinkingOfSellingButton = [...document.querySelectorAll('.button.button--xl.button--outline.w-full')]; // go through thinkingOfSellingButton and find the one that says "thinking of selling?" 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(); // Assuming this function is defined const offerButtonObserve = document.getElementById('offerButton'); // Assuming this is the offer button const parentElement = addToCartButtonObserve.parentElement; } 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 = '#c68e8d'; 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]; if ( add10pxMarginTop.includes(2218972) || buttonsTouching) { console.log('adding 10px margin top'); button.style.marginTop = '10px'; } var add10pxMarginBottom = [69664833775, 67113091311, 55008591957, 80557900122, 56191680721, 20281681]; if ( add10pxMarginBottom.includes(2218972) ) { button.style.marginBottom = '10px'; } var noMarginBottom = [77076005182, 58405322835, 75196203307, 61769482425, 27527348276, 57320276143]; if ( noMarginBottom.includes(2218972) ) { button.style.marginBottom = '0px'; } var add5pxMarginTop = [61879943221]; if ( add5pxMarginTop.includes(2218972) ) { button.style.marginTop = '5px'; } var margin0px = [85798322485] if (margin0px.includes(2218972)) { button.style.margin = '0px'; } if ( 2218972 == 3014819906) { button.style.width = '230px'; } var sameWidthButton = [55508664503, 55218503785, 20281681, 77076005182, 58405322835, 29999070, 56208556218, 61769482425, 27527348276, 57320276143 ]; if ( sameWidthButton.includes(2218972) ) { button.style.width = addToCartButtonStyle.width; } if ( 2218972 == 29999070 ) { button.style.padding = '0px'; } if (2218972 == 75196203307){ button.style.width = 'fit-content'; } if ( 2218972 == 68129849588) { button.style.gridColumn = 'span 2'; } if ( 2218972 == 8722284) { button.style.margin = '0px'; button.style.marginTop = '10px'; } if ( 2218972 == 2252701765){ button.style.width = '90%'; button.style.height = ''; } if ( 2218972 == 55717462192) { button.style.maxHeight = button.style.height; button.style.flex = 'none' } if ( 2218972 == 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(2218972) && button.id == 'submitOfferButton') { button.style.width = '100%'; button.style.margin = '0px'; } var maxWidthButton =[55590715717, 13484519, 27394244673 ] if ( maxWidthButton.includes(2218972) && button.id == 'offerButton') { button.style.maxWidth = addToCartButtonStyle.width; } if ( 2218972 == 27254259764 && button.id == 'offerButton') { button.style.fontSize = 'inherit'; button.style.width = 'fit-content'; button.classList.add('btn'); } if ( 2218972 == 34290827396) { if (button.id == 'submitOfferButton') { button.style.maxWidth = ''; button.classList.remove('btn'); } } if ( 2218972 == 87724163412){ button.style.maxHeight = '44px'; button.style.height = '44px'; button.style.textTransform = 'uppercase'; button.style.textAlign = 'center'; button.style.fontSize = '14px'; } if ( 2218972 == 12125098 && button.id == 'offerButton'){ button.style.padding = ''; button.style.paddingBottom = '4px'; button.style.maxWidth = '200px'; button.style.marginLeft='10px'; } if ( 2218972 == 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] if (copyButtonClasses.includes(2218972) && 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('agregar al carrito')) && !button.textContent.trim().toLowerCase().includes('terms of purchase') ); if (2218972 == 68611277022){ addToCartButton = document.querySelector("[id*='ProductSubmitButton']"); } if (2218972 == 65564082233){ addToCartButton = document.querySelector('.product__info-container.product__column-sticky .addTocart-input-card'); } if (2218972 == 20281681) { if (addToCartButton && !addToCartButton.id.trim().toLowerCase().includes('productsubmitbutton')) { var productToCart = document.querySelector('product-form'); if (productToCart) { addToCartButton = productToCart.querySelector('button'); } } } if (2218972 == 49574117544) { addToCartButton = document.querySelector('.product-form__submit.button.button--secondary.an-horizontal-shaking.button-text-change'); } if ( 2218972 == 25109954659 || 2218972 == 20375995 || 2218972 == 90128974103) { addToCartButton = document.getElementById("addToCart"); } if ( 2218972 == 7315363 ){ addToCartButton = document.querySelector('input[value="Add To Cart"]') } if ( 2218972 == 67113091311) { if (!addToCartButton) { addToCartButton = document.querySelector('button[value="Add to cart"]'); } } if ( 2218972 == 83549651224) { addToCartButton = document.querySelector('input[type="submit"][name="button"][value="Add to Cart"].btn-secondary'); } if ( 2218972 == 65386643635) { addToCartButton = document.querySelector(".btn_sp.addtocart_btn.product-form__cart-submit"); } if ( 2218972 == 78885716262) { addToCartButton = document.querySelectorAll('button[data-aid="product-form-submit-button"][data-name="product-submit"]')[1]; } if ( 2218972 == 13638089 || 2218972 == 86882484502 ) { addToCartButton = document.getElementById('AddToCart'); } if ( 2218972 == 82779046162) { var potentialAddToCartButton = document.getElementById('AddToCart'); if (potentialAddToCartButton && !potentialAddToCartButton.textContent.toLowerCase().includes('ausverkauft')) { addToCartButton = potentialAddToCartButton; } } if ( 2218972 == 3014819906 ) { addToCartButton = document.querySelector('input.add-to-cart[type="submit"]'); } if ( 2218972 == 2252701765 ){ addToCartButton = document.querySelector('input[value="Purchase"]'); } if ( 2218972 == 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 ( 2218972 == 53819474108 ) { addToCartButton = document.querySelector('[data-js-trigger-id="add-to-cart"]'); } if ( 2218972 == 87724163412 ){ addToCartButton = document.getElementById('dynamic-buttons-form') } if ( 2218972 == 13484519 ) { addToCartButton = document.querySelector('.btn.btn-lg.btn-addtocart.addtocart-js'); } if ( 2218972 == 56508154036 ) { addToCartButton = document.querySelector('form[action="/cart/add"][method="post"]'); } if (2218972 == 66722889920){ addToCartButton = document.querySelector('button[name="add"][type="submit"]'); } if (!addToCartButton) { if (Shopify.designMode && showButton()) { var supportModal = document.getElementById('OfferlySupportDiv'); supportModal.style.display = 'flex'; mixpanel.track("Support Modal Opened", { admin: true, shop: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, } ); } 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: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, } ); } else { mixpanel.track("Modal Opened", { shop: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, } ); } 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 = `
Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap
`; productMobileTitle.innerHTML = `
Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap
`; return `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`; } else{ productTitle.innerHTML = title; productMobileTitle.innerHTML = title; return title; } } function setupExitIntent(callback) { let hasShownExitIntent = false; function handleMouseOut(event) { if (hasShownExitIntent) return; if ( event.clientY <= 0 || event.relatedTarget === null ) { hasShownExitIntent = true; callback(); } } document.addEventListener("mouseout", handleMouseOut); } function updateModalInformation(selectedVariant){ var productVariants = [{"id":40997879447632,"title":"Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.","option1":"Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.","option2":null,"option3":null,"sku":"LX-5026 Burnt Biscuit Blonde-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623690320,"product_id":7127845503056,"position":7,"created_at":"2024-03-04T11:55:18-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Burnt Biscuit Blonde-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/BURNTBISCUITBLONDE-R_f20e616a-928d-45aa-a9ae-9bb2d62480cc.jpg?v=1715098119","variant_ids":[40997879447632]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.","public_title":"Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.","options":["Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":17,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550157","featured_media":{"alt":"Burnt Biscuit Blonde-R","id":24201273638992,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/BURNTBISCUITBLONDE-R_f20e616a-928d-45aa-a9ae-9bb2d62480cc.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879480400,"title":"Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root.","option1":"Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root.","option2":null,"option3":null,"sku":"LX-5026 Chocolate Buttercream-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623723088,"product_id":7127845503056,"position":8,"created_at":"2024-03-04T11:55:18-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Chocolate Buttercream-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/CHOCOLATEBUTTERCREAM-R_f3186d64-09d0-45b8-aaa9-09bf21955671.jpg?v=1715098119","variant_ids":[40997879480400]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root.","public_title":"Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root.","options":["Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550164","featured_media":{"alt":"Chocolate Buttercream-R","id":24201273671760,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/CHOCOLATEBUTTERCREAM-R_f3186d64-09d0-45b8-aaa9-09bf21955671.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879513168,"title":"Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted.","option1":"Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted.","option2":null,"option3":null,"sku":"LX-5026 Cool Champagne Blonde","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623788624,"product_id":7127845503056,"position":9,"created_at":"2024-03-04T11:55:18-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Cool Champagne Blonde","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/COOLCHAMPAGNEBLONDE_8a4ce98a-df35-4e87-bf1c-3f637e25c175.jpg?v=1715098119","variant_ids":[40997879513168]},"available":false,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted.","public_title":"Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted.","options":["Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550171","featured_media":{"alt":"Cool Champagne Blonde","id":24201273704528,"position":9,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/COOLCHAMPAGNEBLONDE_8a4ce98a-df35-4e87-bf1c-3f637e25c175.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879545936,"title":"Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde.","option1":"Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde.","option2":null,"option3":null,"sku":"LX-5026 Ginger Ale Blonde","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623821392,"product_id":7127845503056,"position":10,"created_at":"2024-03-04T11:55:19-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Ginger Ale Blonde","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/GINGERALEBLONDE_2a1db474-8236-4f16-9ecb-8a656ddbb999.jpg?v=1715098119","variant_ids":[40997879545936]},"available":false,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde.","public_title":"Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde.","options":["Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550188","featured_media":{"alt":"Ginger Ale Blonde","id":24201273737296,"position":10,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/GINGERALEBLONDE_2a1db474-8236-4f16-9ecb-8a656ddbb999.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879578704,"title":"Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde.","option1":"Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde.","option2":null,"option3":null,"sku":"LX-5026 Hazelnut Syrup","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623952464,"product_id":7127845503056,"position":11,"created_at":"2024-03-04T11:55:19-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Hazelnut Syrup","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/HAZELNUTSYRUP_e6709f34-55c3-47c7-896a-1f73e712e3b9.jpg?v=1715098119","variant_ids":[40997879578704]},"available":false,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde.","public_title":"Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde.","options":["Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550195","featured_media":{"alt":"Hazelnut Syrup","id":24201273868368,"position":11,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/HAZELNUTSYRUP_e6709f34-55c3-47c7-896a-1f73e712e3b9.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879611472,"title":"Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process.","option1":"Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process.","option2":null,"option3":null,"sku":"LX-5026 Oyster","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623985232,"product_id":7127845503056,"position":12,"created_at":"2024-03-04T11:55:19-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Oyster","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/OYSTER_a0d4bce3-66ee-4fdf-b4bd-7ad7f8f0398e.jpg?v=1715098119","variant_ids":[40997879611472]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process.","public_title":"Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process.","options":["Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550201","featured_media":{"alt":"Oyster","id":24201273901136,"position":12,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/OYSTER_a0d4bce3-66ee-4fdf-b4bd-7ad7f8f0398e.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879644240,"title":"Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde.","option1":"Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde.","option2":null,"option3":null,"sku":"LX-5026 Pumpkin Pie Spice-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624018000,"product_id":7127845503056,"position":13,"created_at":"2024-03-04T11:55:19-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Pumpkin Pie Spice-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/PUMPKINPIESPICE-R_8924b91b-7ce1-4783-a708-3b13c9e1f370.jpg?v=1715098119","variant_ids":[40997879644240]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde.","public_title":"Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde.","options":["Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550218","featured_media":{"alt":"Pumpkin Pie Spice-R","id":24201273933904,"position":13,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/PUMPKINPIESPICE-R_8924b91b-7ce1-4783-a708-3b13c9e1f370.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879677008,"title":"Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany.","option1":"Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany.","option2":null,"option3":null,"sku":"LX-5026 Rich Chocolate Brown-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624050768,"product_id":7127845503056,"position":14,"created_at":"2024-03-04T11:55:20-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Rich Chocolate Brown-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/RICHCHOCOLATEBROWN-R_9cea65fc-68b6-49ae-beb0-db364df8cb1a.jpg?v=1715098119","variant_ids":[40997879677008]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany.","public_title":"Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany.","options":["Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550225","featured_media":{"alt":"Rich Chocolate Brown-R","id":24201273966672,"position":14,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/RICHCHOCOLATEBROWN-R_9cea65fc-68b6-49ae-beb0-db364df8cb1a.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879709776,"title":"Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights.","option1":"Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights.","option2":null,"option3":null,"sku":"LX-5026 Shaken Oatmilk Blonde-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624083536,"product_id":7127845503056,"position":15,"created_at":"2024-03-04T11:55:20-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Shaken Oatmilk Blonde-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SHAKENOATMILKBLONDE-R_2d2eb8ff-e0e8-47a3-923e-1a999eb4a64d.jpg?v=1715098119","variant_ids":[40997879709776]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights.","public_title":"Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights.","options":["Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":9,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550232","featured_media":{"alt":"Shaken Oatmilk Blonde-R","id":24201273999440,"position":15,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SHAKENOATMILKBLONDE-R_2d2eb8ff-e0e8-47a3-923e-1a999eb4a64d.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879742544,"title":"Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown.","option1":"Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown.","option2":null,"option3":null,"sku":"LX-5026 Sunkissed Almond-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624116304,"product_id":7127845503056,"position":16,"created_at":"2024-03-04T11:55:20-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Sunkissed Almond-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SUNKISSEDALMOND-R_90bcbd3a-baa0-4667-b912-c97b44c04c70.jpg?v=1715098119","variant_ids":[40997879742544]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown.","public_title":"Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown.","options":["Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":14,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550249","featured_media":{"alt":"Sunkissed Almond-R","id":24201274032208,"position":16,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SUNKISSEDALMOND-R_90bcbd3a-baa0-4667-b912-c97b44c04c70.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879775312,"title":"Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted.","option1":"Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted.","option2":null,"option3":null,"sku":"LX-5026 Sunset Blonde","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624149072,"product_id":7127845503056,"position":17,"created_at":"2024-03-04T11:55:20-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Sunset Blonde","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SUNSETBLONDE_b0ef66a9-7d08-4805-a592-674694627688.jpg?v=1715098119","variant_ids":[40997879775312]},"available":false,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted.","public_title":"Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted.","options":["Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550256","featured_media":{"alt":"Sunset Blonde","id":24201274064976,"position":17,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SUNSETBLONDE_b0ef66a9-7d08-4805-a592-674694627688.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879808080,"title":"Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection.","option1":"Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection.","option2":null,"option3":null,"sku":"LX-5026 Toasted Walnut-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624181840,"product_id":7127845503056,"position":18,"created_at":"2024-03-04T11:55:21-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Toasted Walnut-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/TOASTEDWALNUT-R_fd54899e-5b70-4ba3-9716-8c76416935e4.jpg?v=1715098119","variant_ids":[40997879808080]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection.","public_title":"Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection.","options":["Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550263","featured_media":{"alt":"Toasted Walnut-R","id":24201274097744,"position":18,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/TOASTEDWALNUT-R_fd54899e-5b70-4ba3-9716-8c76416935e4.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}] var productTitleBase = `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`; 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(`7127845503056`, null); if (productVariants){ productVariants.forEach(function (variant) { if (variant.id == selectedVariant){ selectedSKU = variant.sku; productVariantSKU.innerHTML = `SKU: ${selectedSKU}`; productURL = "/products/pandora-ht-wig-by-belletress-heat-friendly-synthetic-hair-average-cap" + "?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 = `//www.wigstudio1.com/cdn/shop/files/Pandora__sunkissed_almond-R_1.jpg?v=1732492206&width=300`; mobileImage.src = `//www.wigstudio1.com/cdn/shop/files/Pandora__sunkissed_almond-R_1.jpg?v=1732492206&width=300`; prodOfferImageSrc = `//www.wigstudio1.com/cdn/shop/files/Pandora__sunkissed_almond-R_1.jpg?v=1732492206&width=300`; } if (2218972 == 19510265) { 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`; } if (2218972 == 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(2218972) ) { 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 = currencySymbol + formatPrice(updatedPriceMaxNumber); var compareAtPriceDiv = ''; var compareAtPriceWithSymbol = '$' + formatPrice(compareAtPrice); if ( false && !compareAtPrice.includes('NaN') && compareAtPrice > 0){ compareAtPriceDiv = `
` } var issue; if (!offerRegex.test(offer)) { issue = 'Invalid Offer. Numbers and decimals only.' offerInput.setCustomValidity('Please enter only numbers and a decimal point'); } else if (parseFloat(offer) > updatedPriceMaxNumber) { issue = 'Offer Cannot Exceed Price' offerInput.setCustomValidity('Please enter an offer less than the price'); } else if (parseFloat(offer) <= 0) { issue = 'Offer Must Be Above Zero' offerInput.setCustomValidity('Please enter an offer greater than 0'); } else { offerInput.setCustomValidity(''); } // update element with id modalPrice to inclue a percentage off const modalPrice = document.getElementById('modalPrice'); const mobileModalPrice = document.getElementById('mobileModalPrice'); const percentageOff = (1 - (parseFloat(offer) / updatedPriceMaxNumber)) * 100; const priceTwoDecimal = formatPrice(updatedPriceMaxNumber); const doNotShowStrikeThrough = [67139436723]; if (offer !== '' && offerRegex.test(offer) && parseFloat(offer) < updatedPriceMaxNumber && parseFloat(offer) > 0 && !doNotShowStrikeThrough.includes(2218972)){ var doNotShowPercentageOff = [19510265 || 2218972 == 29972538,29972538]; var percentageOffText = doNotShowPercentageOff.includes(2218972) ? '' : ' (' + percentageOff.toFixed(2) + '% off)'; modalPrice.innerHTML = 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 (2218972 == 68350411027 ){ // add a space after the currency symbol modalPrice.innerHTML = modalPrice.innerHTML.replace('$', '$ '); mobileModalPrice.innerHTML = mobileModalPrice.innerHTML.replace('$', '$ '); //replace all commas with apostrophes modalPrice.innerHTML = modalPrice.innerHTML.replace(/,/g, "'"); mobileModalPrice.innerHTML = mobileModalPrice.innerHTML.replace(/,/g, "'"); } } function formatPrice(price) { //if price is a string, convert it to a number price = parseFloat(price).toFixed(2); price = (price.endsWith('.00') ? parseInt(price, 10) : price).toString(); // add commas to the price if it is greater than 999 and remove nubmers after decimal if (price > 999) { return price.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } else { return 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: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, buttonText: buttonText, } ); onClick() }; 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: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, 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: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, } ); 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 (2218972 == 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; // Function to reset the timer 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 showButton(){ let showButton = false; outerLoop: for (const offering of showButtonInformation.offerings) { switch (offering.productSelectorType) { case 'all': showButton = true; autoResponseDelay = offering.automatedResponseDelay; delayAutoMessage = offering.delayAutomatedResponse; 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; break outerLoop; } } break; case 'products': if (offering.products.includes(productVariantId)) { showButton = true; autoResponseDelay = offering.automatedResponseDelay; delayAutoMessage = offering.delayAutomatedResponse; break outerLoop; } break; case 'none': showButton = false; default: showButton = false; } } var soldOut = [...document.querySelectorAll('button')].find((button) => button.textContent.trim().toLowerCase().includes('sold out') ) var ignoreSoldOut = [67113091311, 78280556873, 58405322835, 20281681, 61769482425, 27527348276, 57320276143]; if (soldOut && !ignoreSoldOut.includes(2218972)) { showButton = false; } if ( 2218972 == 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":40997879447632,"title":"Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.","option1":"Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.","option2":null,"option3":null,"sku":"LX-5026 Burnt Biscuit Blonde-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623690320,"product_id":7127845503056,"position":7,"created_at":"2024-03-04T11:55:18-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Burnt Biscuit Blonde-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/BURNTBISCUITBLONDE-R_f20e616a-928d-45aa-a9ae-9bb2d62480cc.jpg?v=1715098119","variant_ids":[40997879447632]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.","public_title":"Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root.","options":["Burnt Biscuit Blonde-R | 10\/16\/88+8 | Slightly warmer than the famous Butterbeer Blonde, blend of sandy, hint of honey, creamy soft blonde with mixture of medium root."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":17,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550157","featured_media":{"alt":"Burnt Biscuit Blonde-R","id":24201273638992,"position":7,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/BURNTBISCUITBLONDE-R_f20e616a-928d-45aa-a9ae-9bb2d62480cc.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879480400,"title":"Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root.","option1":"Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root.","option2":null,"option3":null,"sku":"LX-5026 Chocolate Buttercream-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623723088,"product_id":7127845503056,"position":8,"created_at":"2024-03-04T11:55:18-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Chocolate Buttercream-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/CHOCOLATEBUTTERCREAM-R_f3186d64-09d0-45b8-aaa9-09bf21955671.jpg?v=1715098119","variant_ids":[40997879480400]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root.","public_title":"Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root.","options":["Chocolate Buttercream-R | 8\/25+4 | Medium and dark brown rooted, blend of medium brown, dark blonde and low lights of dark and medium brown root."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550164","featured_media":{"alt":"Chocolate Buttercream-R","id":24201273671760,"position":8,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/CHOCOLATEBUTTERCREAM-R_f3186d64-09d0-45b8-aaa9-09bf21955671.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879513168,"title":"Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted.","option1":"Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted.","option2":null,"option3":null,"sku":"LX-5026 Cool Champagne Blonde","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623788624,"product_id":7127845503056,"position":9,"created_at":"2024-03-04T11:55:18-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Cool Champagne Blonde","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/COOLCHAMPAGNEBLONDE_8a4ce98a-df35-4e87-bf1c-3f637e25c175.jpg?v=1715098119","variant_ids":[40997879513168]},"available":false,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted.","public_title":"Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted.","options":["Cool Champagne Blonde | 32432 | Medium ash blonde with champagne and cream soda blonde, cool blonde with platinum highlights, unrooted."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550171","featured_media":{"alt":"Cool Champagne Blonde","id":24201273704528,"position":9,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/COOLCHAMPAGNEBLONDE_8a4ce98a-df35-4e87-bf1c-3f637e25c175.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879545936,"title":"Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde.","option1":"Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde.","option2":null,"option3":null,"sku":"LX-5026 Ginger Ale Blonde","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623821392,"product_id":7127845503056,"position":10,"created_at":"2024-03-04T11:55:19-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Ginger Ale Blonde","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/GINGERALEBLONDE_2a1db474-8236-4f16-9ecb-8a656ddbb999.jpg?v=1715098119","variant_ids":[40997879545936]},"available":false,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde.","public_title":"Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde.","options":["Ginger Ale Blonde | 8\/25\/613 | Unrooted warm blonde with variegated colors of medium brown, medium and light gold blonde, highlighted with light blonde."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550188","featured_media":{"alt":"Ginger Ale Blonde","id":24201273737296,"position":10,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/GINGERALEBLONDE_2a1db474-8236-4f16-9ecb-8a656ddbb999.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879578704,"title":"Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde.","option1":"Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde.","option2":null,"option3":null,"sku":"LX-5026 Hazelnut Syrup","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623952464,"product_id":7127845503056,"position":11,"created_at":"2024-03-04T11:55:19-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Hazelnut Syrup","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/HAZELNUTSYRUP_e6709f34-55c3-47c7-896a-1f73e712e3b9.jpg?v=1715098119","variant_ids":[40997879578704]},"available":false,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde.","public_title":"Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde.","options":["Hazelnut Syrup | 6\/33\/613 | Unrooted, mixture of medium brown, hint of dark auburn, gold blonde, hightlihgted with light blonde."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550195","featured_media":{"alt":"Hazelnut Syrup","id":24201273868368,"position":11,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/HAZELNUTSYRUP_e6709f34-55c3-47c7-896a-1f73e712e3b9.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879611472,"title":"Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process.","option1":"Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process.","option2":null,"option3":null,"sku":"LX-5026 Oyster","requires_shipping":true,"taxable":true,"featured_image":{"id":31731623985232,"product_id":7127845503056,"position":12,"created_at":"2024-03-04T11:55:19-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Oyster","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/OYSTER_a0d4bce3-66ee-4fdf-b4bd-7ad7f8f0398e.jpg?v=1715098119","variant_ids":[40997879611472]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process.","public_title":"Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process.","options":["Oyster | 1B\/60\/1001 | Fashionable gray, blend of lightest gray, silver, white, with dark mix gray just on the nape to create the natural graying process."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550201","featured_media":{"alt":"Oyster","id":24201273901136,"position":12,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/OYSTER_a0d4bce3-66ee-4fdf-b4bd-7ad7f8f0398e.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879644240,"title":"Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde.","option1":"Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde.","option2":null,"option3":null,"sku":"LX-5026 Pumpkin Pie Spice-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624018000,"product_id":7127845503056,"position":13,"created_at":"2024-03-04T11:55:19-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Pumpkin Pie Spice-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/PUMPKINPIESPICE-R_8924b91b-7ce1-4783-a708-3b13c9e1f370.jpg?v=1715098119","variant_ids":[40997879644240]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde.","public_title":"Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde.","options":["Pumpkin Pie Spice-R | 27\/130\/613+8 | Medium brown rooted, combination of strawberry, medium and light copper red, highlighted with light blonde."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550218","featured_media":{"alt":"Pumpkin Pie Spice-R","id":24201273933904,"position":13,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/PUMPKINPIESPICE-R_8924b91b-7ce1-4783-a708-3b13c9e1f370.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879677008,"title":"Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany.","option1":"Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany.","option2":null,"option3":null,"sku":"LX-5026 Rich Chocolate Brown-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624050768,"product_id":7127845503056,"position":14,"created_at":"2024-03-04T11:55:20-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Rich Chocolate Brown-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/RICHCHOCOLATEBROWN-R_9cea65fc-68b6-49ae-beb0-db364df8cb1a.jpg?v=1715098119","variant_ids":[40997879677008]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany.","public_title":"Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany.","options":["Rich Chocolate Brown-R | 2\/4\/30+4 | Rooted with dark brown, mixture of dark and medium brown, heavily highlighted with dark auburn , strawberry, mahogany."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550225","featured_media":{"alt":"Rich Chocolate Brown-R","id":24201273966672,"position":14,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/RICHCHOCOLATEBROWN-R_9cea65fc-68b6-49ae-beb0-db364df8cb1a.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879709776,"title":"Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights.","option1":"Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights.","option2":null,"option3":null,"sku":"LX-5026 Shaken Oatmilk Blonde-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624083536,"product_id":7127845503056,"position":15,"created_at":"2024-03-04T11:55:20-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Shaken Oatmilk Blonde-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SHAKENOATMILKBLONDE-R_2d2eb8ff-e0e8-47a3-923e-1a999eb4a64d.jpg?v=1715098119","variant_ids":[40997879709776]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights.","public_title":"Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights.","options":["Shaken Oatmilk Blonde-R | 8\/25\/613+8 | Medium brown rooted, medium and light brown base with cool and neutral blonde to balance along with light blonde hightlights."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":9,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550232","featured_media":{"alt":"Shaken Oatmilk Blonde-R","id":24201273999440,"position":15,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SHAKENOATMILKBLONDE-R_2d2eb8ff-e0e8-47a3-923e-1a999eb4a64d.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879742544,"title":"Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown.","option1":"Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown.","option2":null,"option3":null,"sku":"LX-5026 Sunkissed Almond-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624116304,"product_id":7127845503056,"position":16,"created_at":"2024-03-04T11:55:20-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Sunkissed Almond-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SUNKISSEDALMOND-R_90bcbd3a-baa0-4667-b912-c97b44c04c70.jpg?v=1715098119","variant_ids":[40997879742544]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown.","public_title":"Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown.","options":["Sunkissed Almond-R | 4\/27\/613+8 | A combination of medium and light brown, highlighted with light gold blonde, and hint of cooler blonde, rooted with medium and light brown."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":14,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550249","featured_media":{"alt":"Sunkissed Almond-R","id":24201274032208,"position":16,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SUNKISSEDALMOND-R_90bcbd3a-baa0-4667-b912-c97b44c04c70.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879775312,"title":"Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted.","option1":"Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted.","option2":null,"option3":null,"sku":"LX-5026 Sunset Blonde","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624149072,"product_id":7127845503056,"position":17,"created_at":"2024-03-04T11:55:20-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Sunset Blonde","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SUNSETBLONDE_b0ef66a9-7d08-4805-a592-674694627688.jpg?v=1715098119","variant_ids":[40997879775312]},"available":false,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted.","public_title":"Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted.","options":["Sunset Blonde | 13\/27\/613 | Warm blonde with tons of dimension, light gold blonde highlight and light auburn mixed to create more depth of color.Unrooted."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550256","featured_media":{"alt":"Sunset Blonde","id":24201274064976,"position":17,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/SUNSETBLONDE_b0ef66a9-7d08-4805-a592-674694627688.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40997879808080,"title":"Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection.","option1":"Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection.","option2":null,"option3":null,"sku":"LX-5026 Toasted Walnut-R","requires_shipping":true,"taxable":true,"featured_image":{"id":31731624181840,"product_id":7127845503056,"position":18,"created_at":"2024-03-04T11:55:21-08:00","updated_at":"2024-05-07T09:08:39-07:00","alt":"Toasted Walnut-R","width":1000,"height":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/TOASTEDWALNUT-R_fd54899e-5b70-4ba3-9716-8c76416935e4.jpg?v=1715098119","variant_ids":[40997879808080]},"available":true,"name":"Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap - Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection.","public_title":"Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection.","options":["Toasted Walnut-R | 10\/25+8 | Medium brown rooted, ash brown, medium gold blonde, and light brown blended to perfection."],"price":62900,"weight":283,"compare_at_price":74600,"inventory_quantity":10,"inventory_management":"shopify","inventory_policy":"deny","barcode":"840238550263","featured_media":{"alt":"Toasted Walnut-R","id":24201274097744,"position":18,"preview_image":{"aspect_ratio":1.0,"height":1000,"width":1000,"src":"\/\/www.wigstudio1.com\/cdn\/shop\/files\/TOASTEDWALNUT-R_fd54899e-5b70-4ba3-9716-8c76416935e4.jpg?v=1715098119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}] 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: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, offerAmount: data['offerAmount'], } ); //disable the button 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) => { //enable the button hideSpinner(); submitOfferButton.disabled = false; var delayForAutoResponse = delayAutoMessage ? autoResponseDelay : 0; if (data.offerStatus === 'Pending'){ if (2218972 == 50712314049 ){ updateModalState("Thank you for contacting Lougher", "A member of our sales team will get back to you shortly.", "Close", closeOfferlyModal); } else if(2218972 == 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 (2218972 == 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: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, offerAmount: data['offerAmount'], }); } if (data.offerStatus === 'Auto-Declined'){ mixpanel.track("Offer Auto-Declined", { shop: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, 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: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, 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)); showSpinner(); setTimeout(function(){ hideSpinner(); if (2218972 == 19510265 || 2218972 == 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: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, 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)); 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) => { // Handle any errors console.error(error); mixpanel.track("Offer Error", { shop: `www.wigstudio1.com`, productTitle: `Pandora HT Wig by BelleTress | Heat Friendly Synthetic Hair | Average Cap`, 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'; } } }