Cotswold Children’s Parties: Teddy Bear’s Picnic - Tuesday 22nd Octobe (2024)

\\n

\\n

{{{purchaseOptionsText}}}

\\n

\\n{{^showSubOptionBeforeOneTime}}\\n{{^requires_selling_plan}}\\n

\\n \\n \\n \\n

\\n{{/requires_selling_plan}}\\n{{/showSubOptionBeforeOneTime}}\\n {{#sellingPlanVariants}}\\n

\\n \\n \\n \\n

\\n {{/sellingPlanVariants}}\\n{{#showSubOptionBeforeOneTime}}\\n{{^requires_selling_plan}}\\n

\\n \\n \\n \\n

\\n{{/requires_selling_plan}}\\n{{/showSubOptionBeforeOneTime}}\\n

\\n{{#showStaticTooltip}}\\n

{{{toolTipDescription}}}

\\n{{/showStaticTooltip}}\\n{{#showTooltip}}\\n

\\n

\\n {{{tooltipTitle}}}\\n

\\n

\\n {{{toolTipDescription}}}\\n

\\n {{#showAppstleLink}}\\n

\\n \\n POWERED BY APPSTLE\\n \\n

\\n {{/showAppstleLink}}\\n

\\n

\\n{{/showTooltip}}\\n

\\n

{% endraw %}\"}", "bundle": {"perDelivery":"/Delivery","showDiscountInCart":"false","discountPopupBuy":"Buy Now","showDiscountPopup":true,"discountPopupAmount":"","showOnProductPage":"true","showDescription":false,"showMultipleOnProductPage":"false","oneTimeDiscount":"false","variant":"Variant","selector":"","showProductPrice":"true","customCss":"","actionButtonFontColor":"","redirectTo":"CART","productTitleColor":"","discountPopupCheckoutMessage":"Apply Discount and go to checkout ?","discountPopupNo":"No","elementCSS":"[]","actionButtonColor":"","deliveryFrequency":"Delivery Frequency","forceReloadWidgetSelector":"","productPriceColor":"","bundleRules":"[{\"id\":3431,\"shop\":\"dunkertons-cider.myshopify.com\",\"name\":\"Gift Bundle\",\"title\":\"Best of British Gift Subscription\",\"description\":\"The gift that keeps on giving! They get Organic Cider delivered every month for 3 months! They also get a complimentry pint glass and tasting notes with their first order.\",\"priceSummary\":null,\"actionButtonText\":\"Checkout\",\"actionButtonDescription\":\"£4 shipping per order\",\"status\":\"PAUSED\",\"showBundleWidget\":false,\"customerIncludeTags\":null,\"startDate\":null,\"endDate\":null,\"discountType\":\"PERCENTAGE\",\"discountValue\":null,\"bundleLevel\":\"VARIANT\",\"products\":null,\"variants\":\"[{\\\"id\\\":9792873988132,\\\"type\\\":\\\"VARIANT\\\",\\\"title\\\":\\\"Glassware - 1 Pint Tankard\\\",\\\"price\\\":\\\"7.00\\\",\\\"imageSrc\\\":\\\"https://cdn.shopify.com/s/files/1/2513/0530/products/TULIP_PINT.png?v=1669200658\\\",\\\"productHandle\\\":\\\"glassware\\\"},{\\\"id\\\":11719290912804,\\\"type\\\":\\\"VARIANT\\\",\\\"title\\\":\\\"Best of British - 12 Case\\\",\\\"price\\\":\\\"39.40\\\",\\\"imageSrc\\\":\\\"https://cdn.shopify.com/s/files/1/2513/0530/products/BESTOFBRITISH2021_1519a4bf-2874-41bc-97dc-91143466eb8d.png?v=1651591666\\\",\\\"productHandle\\\":\\\"best-of-british-blends\\\"},{\\\"id\\\":11698602377252,\\\"type\\\":\\\"VARIANT\\\",\\\"title\\\":\\\"Best of British - 9 Case\\\",\\\"price\\\":\\\"29.85\\\",\\\"imageSrc\\\":\\\"https://cdn.shopify.com/s/files/1/2513/0530/products/BESTOFBRITISH2021_1519a4bf-2874-41bc-97dc-91143466eb8d.png?v=1651591666\\\",\\\"productHandle\\\":\\\"best-of-british-blends\\\"}]\",\"discountCondition\":null,\"sequenceNo\":2742,\"bundleType\":\"CLASSIC\",\"showCombinedSellingPlan\":false,\"selectSubscriptionByDefault\":true,\"minimumNumberOfItems\":1,\"maximumNumberOfItems\":null,\"maxQuantity\":null,\"minQuantity\":1,\"enableSingleQuantitySelector\":false,\"allowProductQuantityForBundleValidity\":false,\"itemsUncheckedByDefault\":null}]","placement":"AFTER","discountPopupHeader":"you got!"}, "labels": `{\"appstle.subscription.wg.noSubscriptionLabelTextV2\":\"No Subscription\",\"appstle.subscription.wg.cancelAnytimeLabelTextV2\":\"Cancel Anytime\",\"appstle.subscription.wg.addToShipmentErrorTextV2\":\"Error\",\"appstle.subscription.wg.weeksFrequencyTextV2\":\"Weeks\",\"appstle.subscription.wg.weeklyLabelTextV2\":\"Weekly\",\"appstle.subscription.wg.displayAddToExistingSubscriptionButtonForNotLoggedInV2\":\"false\",\"appstle.subscription.wg.addToShipmentProcessingV2\":\"Processing...\",\"appstle.subscription.wg.deliveryEveryFrequencyTextV2\":\"Delivery Every\",\"appstle.subscription.wg.subscribeAndSaveInitalV2\":\"Subscribe & save\",\"appstle.subscription.wg.cartHiddenAttributesSelectorV2\":\"\",\"appstle.subscription.wg.prepaidLabelTextV2\":\"Prepaid\",\"appstle.subscription.wg.daysFrequencyTextV2\":\"Days\",\"appstle.subscription.wg.monthlyLabelTextV2\":\"Monthly\",\"appstle.subscription.wg.subscribeAndSaveSuccessV2\":\"Subscribe success\",\"appstle.subscription.wg.addToShipmentSuccessTextV2\":\"Success\",\"appstle.subscription.wg.monthFrequencyTextV2\":\"Month\",\"appstle.subscription.wg.addToShipmentButtonTextV2\":\"Add to Shipment\",\"appstle.subscription.wg.displayAddToExistingSubscriptionButtonToSubscribersOnlyV2\":\"false\",\"appstle.subscription.wg.yearsFrequencyTextV2\":\"Years\",\"appstle.subscription.wg.onetimeDescriptionTextV2\":\"\",\"appstle.subscription.wg.addToShipmentTooltipTextV2\":\"Please avoid double delivery charges! Login to add this product to an upcoming delivery.\",\"appstle.subscription.wg.weekFrequencyTextV2\":\"Week\",\"appstle.subscription.wg.oneTimePurchaseTextV2\":\"One Time Purchase\",\"appstle.subscription.wg.loyaltyPerkDescriptionTextV2\":\"{{#isDiscountTypeFreeProduct}}

Cotswold Children’s Parties: Teddy Bear’s Picnic - Tuesday 22nd Octobe (1)<\/img><\/div>

Every 10th order, get a FREE {{freeProductName}} <\/span><\/div>

{{\/isDiscountTypeFreeProduct}}{{#isDiscountTypePercentage}}After {{{billingCycleBlock}}}<\/span> order<\/span>, get {{{discount}}}% OFF your entire order<\/span><\/span>.{{\/isDiscountTypePercentage}}{{#isDiscountTypeShipping}}After {{{billingCycleBlock}}}<\/span> order<\/span>, get shipping at {{{formatDiscountedPrice}}}<\/span><\/span>.{{\/isDiscountTypeShipping}}{{#isDiscountTypeFixed}}After {{{billingCycleBlock}}}<\/span> order<\/span>, get {{{formatDiscountedPrice}}} OFF your entire order<\/span><\/span>.{{\/isDiscountTypeFixed}}\",\"appstle.subscription.wg.unsubscribeFrequencyTextV2\":\"unsubscribe\",\"appstle.subscription.wg.widgetVariantChangeListenerSelectorV2\":\"\",\"appstle.subscription.wg.atcButtonTextSelectorV2\":\"\",\"appstle.subscription.wg.atcButtonTextSelectorObserverV2\":\"\",\"appstle.subscription.wg.oneTimeFrequencyTextV2\":\"One Time\",\"appstle.subscription.wg.dayFrequencyTextV2\":\"day\",\"appstle.subscription.wg.allowFulfilmentCountViaPropertiesV2\":\"false\",\"appstle.subscription.wg.valdiateFormSelectorV2\":\"\",\"appstle.subscription.wg.monthsFrequencyTextV2\":\"Months\",\"appstle.subscription.wg.prepaidSaveBadgeTextV2\":\"SAVE {{selectedDiscountPercentage}}\",\"appstle.subscription.wg.manageSubscriptionButtonTextV2\":\"Manage Subscription\",\"appstle.subscription.wg.offFrequencyTextV2\":\"Off\",\"appstle.subscription.wg.yearFrequencyTextV2\":\"Year\",\"appstle.subscription.wg.prepayLabelTextV2\":\"Prepay\",\"appstle.subscription.wg.productPageUnitPriceSelectorV2\":\"\",\"appstle.subscription.wg.widgetPriceChangeListenerSelectorV2\":\"\",\"appstle.subscription.wg.sellingPlanTitleTextNonPrepaid\":\"{{sellingPlanName}}\",\"appstle.subscription.wg.selectDeliverOptionV2\":\"select deliver option\",\"appstle.subscription.wg.atcButtonTextV2\":\"\",\"appstle.subscription.wg.yearlyLabelTextV2\":\"Yearly\"}`, "css": { "appstle_subscription_widget": { "margin-top": "" , "margin-bottom": "", }, "appstle_subscription_wrapper": { "border-width": "", "border-color": "", }, "appstle_circle": { "border-color": "", }, "appstle_dot": { "background-color": "", }, "appstle_select": { "padding-top": "", "padding-bottom": "", "padding-left": "", "padding-right": "", "border-width": "", "border-style": "", "border-color": "", "border-radius": "", }, "tooltip_subscription_svg": { "fill": "", }, "appstle_tooltip": { "color": "", "background-color": "", }, "appstle_tooltip_border_top_color": { "border-top-color": "", }, "appstle_subscription_final_price": { "color": "", }, "appstle_widget_text_color": { "color": "", }, "appstle_selected_background": { "background": "transparent", }, "elementCSS": "[\".appstle-save-badge{ color: #ffffff !important;}\",\".appstle-save-badge::before {background: conic-gradient(transparent 45deg, #252A2B 45deg 135deg, transparent 125deg 360deg) !important;} .appstle-save-badge{ background-color: #252A2B !important;}\"]", "customCSS": "#product-form-template--15307924373540__main-351024119844 > div.quantity-submit-row.input-row > fieldset > div > div.bsub-widget__groups-container > div:nth-child(3) {\n display: none !important;\n}\n\n#appstle_subscription_widget0 .appstle_tooltip_wrapper {\n margin-bottom: 20px;\n}\n\n.appstle_manageSubBtn > button{\n padding: 15px 20px !important;\n}\n.bsub-widget__wrapper{\n display: none!important;\n}\n.bsub-widget{\n display: none!important;\n}\n#appstle_subscription_widget0 {\n margin-top: -30px!important;\n}", "customerPortalCss": "", "externalStyleTag": "", } }; sessionStorage['appstleSubscriptionConfig'] = JSON.stringify(RS.Config); var _RSConfig = _RSConfig || {}; _RSConfig.shop = 'dunkertons-cider.myshopify.com'; _RSConfig.product = {"id":7699942670372,"title":"Cotswold Children’s Parties: Teddy Bear’s Picnic - Tuesday 22nd October","handle":"cotswold-children-s-parties-teddy-bear-s-picnic-tuesday-22nd-october","description":"\u003cp class=\"MsoNormal\"\u003eOnce again, we are thrilled to host Cotswold Children’s Parties.\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003eIf you go down to the woods today, you’d better believe your eyes...!\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003eBring your teddy for 55 mins of action-packed creative fun for ages 1-4 with bubbles, parachutes, puppets, songs, stories, sensory activities, a bear hunt adventure, and of course a fantastic picnic for your teddy’s!\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cstrong\u003eTuesday 22nd October 09:30-10:25am\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cstrong\u003eTicket Types:\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\" style=\"text-indent: 36.0pt;\"\u003e£10 - One child (and parent)\u003c\/p\u003e\n\u003cp class=\"MsoNormal\" style=\"text-indent: 36.0pt;\"\u003e£16 - Two siblings (and parent)\u003c\/p\u003e\n\u003cp class=\"MsoNormal\" style=\"text-indent: 36.0pt;\"\u003eSiblings up to 14 months free\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003eWe have free parking, baby changing, pram parking, warm fire pits.\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003eFind us at: Dunkertons Cider, Dowdeswell Park, London Road, Cheltenham, GL52 6UT\u003c\/p\u003e\n\u003cp data-mce-fragment=\"1\"\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eEvent Terms \u0026amp; Conditions\u003c\/strong\u003e\u003c\/p\u003e\n\u003cul type=\"disc\"\u003e\n\u003cli\u003eThe QR code you have been sent is your ticket for entry. Please have this available to show on your arrival.\u003c\/li\u003e\n\u003cli\u003eThere may be photographers and content creators at the event. By booking a ticket, you consent to yourself and anyone attending with you, including children, appearing in photos and videos, which may be used in promotional materials for Dunkertons and affiliated businesses.\u003c\/li\u003e\n\u003cli\u003eTickets arenon-refundable,please make sure you can attend before booking\u003c\/li\u003e\n\u003cli\u003eNo dogs are permitted in the Taproom during a ticketed event.\u003c\/li\u003e\n\u003cli\u003eThis event takes place in a marquee, please dress accordingly.\u003c\/li\u003e\n\u003cli\u003eToilets available\u003c\/li\u003e\n\u003cli\u003eFree car parking available on-site\u003c\/li\u003e\n\u003cli\u003eWe reserve the right to contact you via email or phone with information regarding the event\u003c\/li\u003e\n\u003cli\u003eIf we have reason to cancel the event, the full amount will be refunded\u003c\/li\u003e\n\u003c\/ul\u003e","published_at":"2024-09-04T09:33:23+01:00","created_at":"2024-09-03T16:02:02+01:00","vendor":"Dunkertons Cider","type":"Event","tags":[],"price":1000,"price_min":1000,"price_max":1600,"available":false,"price_varies":true,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":41820810838052,"title":"One Child","option1":"One Child","option2":null,"option3":null,"sku":null,"requires_shipping":false,"taxable":true,"featured_image":null,"available":false,"name":"Cotswold Children’s Parties: Teddy Bear’s Picnic - Tuesday 22nd October - One Child","public_title":"One Child","options":["One Child"],"price":1000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":null,"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":41822561140772,"title":"Two Siblings","option1":"Two Siblings","option2":null,"option3":null,"sku":"","requires_shipping":false,"taxable":true,"featured_image":null,"available":false,"name":"Cotswold Children’s Parties: Teddy Bear’s Picnic - Tuesday 22nd October - Two Siblings","public_title":"Two Siblings","options":["Two Siblings"],"price":1600,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":"shopify","inventory_policy":"deny","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/www.dunkertonscider.co.uk\/cdn\/shop\/files\/Untitled-29_41cd74a7-f4ef-40c1-8f80-60d84d5d96aa.png?v=1727958205","\/\/www.dunkertonscider.co.uk\/cdn\/shop\/files\/August_8_2_a693ce54-5a16-4f13-a010-e9ea0078c416.jpg?v=1727863903"],"featured_image":"\/\/www.dunkertonscider.co.uk\/cdn\/shop\/files\/Untitled-29_41cd74a7-f4ef-40c1-8f80-60d84d5d96aa.png?v=1727958205","options":["Ticket Type"],"media":[{"alt":null,"id":25841785667620,"position":1,"preview_image":{"aspect_ratio":1.0,"height":1080,"width":1080,"src":"\/\/www.dunkertonscider.co.uk\/cdn\/shop\/files\/Untitled-29_41cd74a7-f4ef-40c1-8f80-60d84d5d96aa.png?v=1727958205"},"aspect_ratio":1.0,"height":1080,"media_type":"image","src":"\/\/www.dunkertonscider.co.uk\/cdn\/shop\/files\/Untitled-29_41cd74a7-f4ef-40c1-8f80-60d84d5d96aa.png?v=1727958205","width":1080},{"alt":null,"id":25606860767268,"position":2,"preview_image":{"aspect_ratio":1.0,"height":1262,"width":1262,"src":"\/\/www.dunkertonscider.co.uk\/cdn\/shop\/files\/August_8_2_a693ce54-5a16-4f13-a010-e9ea0078c416.jpg?v=1727863903"},"aspect_ratio":1.0,"height":1262,"media_type":"image","src":"\/\/www.dunkertonscider.co.uk\/cdn\/shop\/files\/August_8_2_a693ce54-5a16-4f13-a010-e9ea0078c416.jpg?v=1727863903","width":1262}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp class=\"MsoNormal\"\u003eOnce again, we are thrilled to host Cotswold Children’s Parties.\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003eIf you go down to the woods today, you’d better believe your eyes...!\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003eBring your teddy for 55 mins of action-packed creative fun for ages 1-4 with bubbles, parachutes, puppets, songs, stories, sensory activities, a bear hunt adventure, and of course a fantastic picnic for your teddy’s!\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cstrong\u003eTuesday 22nd October 09:30-10:25am\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003e\u003cstrong\u003eTicket Types:\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp class=\"MsoNormal\" style=\"text-indent: 36.0pt;\"\u003e£10 - One child (and parent)\u003c\/p\u003e\n\u003cp class=\"MsoNormal\" style=\"text-indent: 36.0pt;\"\u003e£16 - Two siblings (and parent)\u003c\/p\u003e\n\u003cp class=\"MsoNormal\" style=\"text-indent: 36.0pt;\"\u003eSiblings up to 14 months free\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003eWe have free parking, baby changing, pram parking, warm fire pits.\u003c\/p\u003e\n\u003cp class=\"MsoNormal\"\u003eFind us at: Dunkertons Cider, Dowdeswell Park, London Road, Cheltenham, GL52 6UT\u003c\/p\u003e\n\u003cp data-mce-fragment=\"1\"\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eEvent Terms \u0026amp; Conditions\u003c\/strong\u003e\u003c\/p\u003e\n\u003cul type=\"disc\"\u003e\n\u003cli\u003eThe QR code you have been sent is your ticket for entry. Please have this available to show on your arrival.\u003c\/li\u003e\n\u003cli\u003eThere may be photographers and content creators at the event. By booking a ticket, you consent to yourself and anyone attending with you, including children, appearing in photos and videos, which may be used in promotional materials for Dunkertons and affiliated businesses.\u003c\/li\u003e\n\u003cli\u003eTickets arenon-refundable,please make sure you can attend before booking\u003c\/li\u003e\n\u003cli\u003eNo dogs are permitted in the Taproom during a ticketed event.\u003c\/li\u003e\n\u003cli\u003eThis event takes place in a marquee, please dress accordingly.\u003c\/li\u003e\n\u003cli\u003eToilets available\u003c\/li\u003e\n\u003cli\u003eFree car parking available on-site\u003c\/li\u003e\n\u003cli\u003eWe reserve the right to contact you via email or phone with information regarding the event\u003c\/li\u003e\n\u003cli\u003eIf we have reason to cancel the event, the full amount will be refunded\u003c\/li\u003e\n\u003c\/ul\u003e"}; _RSConfig.product.collections = [{"id":166891356196,"handle":"all","title":"All","updated_at":"2024-10-16T10:32:05+01:00","body_html":"","published_at":"2020-11-07T09:51:20+00:00","sort_order":"best-selling","template_suffix":"","disjunctive":false,"rules":[{"column":"variant_price","relation":"greater_than","condition":"0"},{"column":"title","relation":"not_contains","condition":"TEST"},{"column":"title","relation":"not_contains","condition":"Best of British Gift Bundle"}],"published_scope":"global"},{"id":167000539172,"handle":"events","title":"Event Tickets","updated_at":"2024-10-16T10:33:30+01:00","body_html":"\u003ch2\u003eBrowse our upcoming events below.\u003c\/h2\u003e\n\u003cp\u003e\u003c\/p\u003e","published_at":"2020-11-17T14:14:05+00:00","sort_order":"manual","template_suffix":"events-tours","disjunctive":false,"rules":[{"column":"type","relation":"equals","condition":"Event"}],"published_scope":"global"}]; _RSConfig.shopMoneyFormat = '£{{amount}}'; _RSConfig.shopMoneyFormatWithCurrencyFormat = '£{{amount}} GBP'; }

`; document.querySelector('body').insertAdjacentHTML('beforeend', snackBarHtml); window.addEventListener('message', toasterEventListener, false); function toasterEventListener(event) { if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_for_notification') !== -1) { var message = event?.data?.split('|')[1]; showAppstleLoyaltyToaster(message); } } let index = 0; function showAppstleLoyaltyToaster(msg) { var snackBar = document.getElementById('snackbar'); snackBar.classList.add('show'); snackBar.insertAdjacentHTML('beforeend', `

${msg}

`); const el = index; setTimeout(function() { if (document.getElementById(`elem${el}`)) document.getElementById(`elem${el}`).remove(); }, 5000); index++; } const closeSnackBar = (el) => document.getElementById(el).remove(); (() => { const socketUrl = 'wss://u5qnpjh34i.execute-api.us-west-1.amazonaws.com/production'; const socket = new WebSocket(socketUrl); const messageQueue = []; socket.addEventListener('open', () => { console.log('WebSocket is open now.'); while (messageQueue && messageQueue?.length > 0) { socket.send(messageQueue.shift()); } }); socket.addEventListener('message', ({ data }) => { const { message, webSocketType = 'MESSAGE' } = JSON.parse(data); if (webSocketType === 'PAGE_REFRESH') { console.log("webSocketType: ",webSocketType); // window.postMessage('refresh_appstle_loyalty_widget') } else if (message) { showAppstleLoyaltyToaster(message); } }); socket.addEventListener('close', () => console.log('WebSocket is closed now.')); socket.addEventListener('error', (error) => console.log('WebSocket error:', error)); const sendMessage = (message) => { if (socket?.readyState === WebSocket?.OPEN) { socket.send(message); } else { messageQueue.push(message); } }; document.addEventListener('DOMContentLoaded', () => { if (_ALConfig.shop && _ALConfig.customerId) { const message = JSON.stringify({ action: 'message', shop: _ALConfig.shop, customerId: _ALConfig.customerId }); sendMessage(message); } }); })(); const loyaltyWidgetStyles = ``; document.querySelector('body').insertAdjacentHTML('beforeend', loyaltyWidgetStyles); const mainHTMLString = ` `; document.querySelector('body').insertAdjacentHTML('beforeend', mainHTMLString); window.addEventListener('message', widgetEventListener, false); function widgetEventListener(event) { if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_message_for_showWidget') !== -1) { } else if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('appstle_widget_showHide') !== -1) { document.querySelector('#appstle-loyalty-button')?.classList?.remove('appstle-loyalty-hidden'); toggleWidget(); } else if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('refresh_appstle_loyalty_widget') !== -1 && _ALConfig?.widget_setting?.widgetType === 'LAUNCHER') { loadAppstleLoyaltyWidget() console.log("REFRESH WIDGET"); } } function removeAppstleLoyaltyWidget() { document.querySelector('#appstle-loyalty-button')?.classList?.add('appstle-loyalty-hidden'); document.querySelector('#appstle_loyalty_iframe')?.classList?.add('appstle-loyalty-hidden'); } (function checkForWidgetRestrictions() { let isShowWidget = true; if(_ALConfig?.customerLoyalty?.customerStatus === 'EXCLUDED') { isShowWidget = false; } if (_ALConfig?.widget_setting?.allowedCustomersTag?.length && isShowWidget) { let allowedTags = _ALConfig?.widget_setting?.allowedCustomersTag.split(','); if (allowedTags?.length > 0 && !_ALConfig?.customerTags?.some((tags) => allowedTags?.includes(tags))) { isShowWidget = false; } } if (_ALConfig?.widget_setting?.restrictedCustomersTag?.length && isShowWidget) { let restrictedTags = _ALConfig?.widget_setting?.restrictedCustomersTag?.split(','); if (restrictedTags?.length > 0 && _ALConfig?.customerTags?.some((tags) => restrictedTags?.includes(tags))) { isShowWidget = false; } } if (_ALConfig?.widget_setting?.blockWidgetOnPages?.length && isShowWidget) { let restrictedPages = _ALConfig?.widget_setting?.blockWidgetOnPages?.split(','); const currentPage = window?.location?.pathname; if (restrictedPages?.length > 0) { if (restrictedPages?.includes('/homepage') && currentPage === '/') { isShowWidget = false; } else if (restrictedPages?.some((page) => currentPage?.includes(page))) { isShowWidget = false; } } } if (_ALConfig?.widget_setting?.allowWidgetOnSpecificPages?.length && isShowWidget) { let allowedPages = _ALConfig?.widget_setting?.allowWidgetOnSpecificPages?.split(','); const currentPage = window?.location?.pathname; if (allowedPages?.length > 0) { if (allowedPages?.includes('/homepage') && currentPage === '/') { isShowWidget = true; } else if (allowedPages?.some((page) => currentPage?.includes(page))) { isShowWidget = true; } else { isShowWidget = false } } } if (!_ALConfig?.customerId && _ALConfig?.widget_setting?.showToLoggedInCustomerOnly) { isShowWidget = false; } if (isShowWidget) { showAppstleLoyaltyWidget(); } else { removeAppstleLoyaltyWidget(); } })() function enableWidget() { document.querySelector('#appstle_loyalty_iframe')?.classList?.add('open'); document.querySelector('#appstle_loyalty_iframe')?.classList?.remove('appstle-loyalty-hidden'); setTimeout(function() { document.querySelector('#appstle_loyalty_iframe')?.classList?.toggle('show-close-icon'); }, 900); } function showAppstleLoyaltyWidget() { document.querySelector('#appstle-loyalty-button')?.classList?.remove('appstle-loyalty-hidden'); document.querySelector('#appstle_loyalty_iframe')?.classList?.remove('appstle-loyalty-hidden'); } document.querySelector('.appstle-loyalty-button').addEventListener('click', toggleWidget); if (_ALConfig?.widget_setting?.widgetPosition === 'LEFT') { document.getElementById('appstle_loyalty_iframe')?.classList?.add('appstle-loyalty-left'); document.querySelector('.appstle-loyalty-button')?.classList?.add('appstle-loyalty-left'); document.getElementById('appstle_loyalty_iframe')?.classList?.add('appstle-loyalty-left'); document.getElementById('snackbar')?.classList?.add('left_snackbar'); } else { document.getElementById('appstle_loyalty_iframe')?.classList?.add('appstle-loyalty-right'); document.querySelector('.appstle-loyalty-button')?.classList?.add('appstle-loyalty-right'); document.getElementById('snackbar')?.classList?.add('right_snackbar'); } const loyaltyButtonTitle = document.getElementById('loyalty-widget-title'); if(_ALConfig?.widget_setting?.widgetTitle){ loyaltyButtonTitle.innerHTML = _ALConfig?.widget_setting?.widgetTitle } else { loyaltyButtonTitle.style.paddingLeft = '0'; } const alIframeSrc = '' + ' ' + '

' + '

' + '

' + '' + 'body' + '>' + ''; function toggleWidget() { loadAppstleLoyaltyWidget(); if (_ALConfig?.widget_setting?.widgetType?.toUpperCase() === 'LAUNCHER' && _ALConfig?.widget_setting?.forceRedirectDedicatedPage === true) { window.open(`/${_ALConfig?.proxy_path_prefix}`); } else { document.querySelector('#appstle_loyalty_iframe')?.classList?.toggle('open'); showAppstleLoyaltyWidget(); setTimeout(function() { document.querySelector('#appstle_loyalty_iframe')?.classList?.toggle('show-close-icon'); }, 900); } } const loadAppstleLoyaltyWidget = () => { var iframe = document.querySelectorAll('#appstle_loyalty_iframe'); iframe.forEach(function(item) { item.contentWindow._ALConfig = _ALConfig; item.contentWindow.document.open('text/html', 'replace'); item.contentWindow.document.write(alIframeSrc); item.contentWindow.document.close(); }); }; if (_ALConfig?.customerLoyalty && _ALConfig?.customerLoyalty?.availablePoints) { document.querySelector('#appstle-loyalty-button')?.classList?.add('appstle_show_points'); document.querySelector('.loyalty_widget_available_points').innerHTML = _ALConfig?.customerLoyalty?.availablePoints?.toLocaleString(); } if (_ALConfig.widget_setting.showTierName && _ALConfig?.customerLoyalty && _ALConfig?.customerLoyalty?.currentVipTier) { document.querySelector('.loyalty_widget_available_points').innerHTML = _ALConfig?.customerLoyalty?.currentVipTier?.toLocaleString(); } if (_ALConfig.widget_setting.showWidget && location?.hash?.indexOf('#appstle-loyalty') !== -1) { handleDeepLink(); } if (window?.location?.hash?.indexOf('#appstle-refer') !== -1) { handleDeepLink(); } function handleDeepLink() { loadAppstleLoyaltyWidget(); document.querySelector('#appstle_loyalty_iframe')?.classList?.toggle('open'); showAppstleLoyaltyWidget(); setTimeout(function() { document.querySelector('#appstle_loyalty_iframe')?.classList?.toggle('show-close-icon'); }, 900); } const widgetReferralUrl = new URL(window.location.href); if (widgetReferralUrl?.searchParams.get('appstle_referral') && _ALConfig?.widget_setting?.widgetType === 'LAUNCHER') { let redirectURL = _ALConfig?.widget_setting?.referralRedirectUrl + window.location.search; if (redirectURL && !window.location.pathname.includes(_ALConfig.widget_setting.referralRedirectUrl)) { window.open(redirectURL, '_self'); } setTimeout(() => { loadAppstleLoyaltyWidget(); enableWidget(); }, 200); } const alDOMObserver = new MutationObserver(function(mutations_list) { mutations_list.forEach(function(mutation) { mutation.addedNodes.forEach(function(added_node) { if (added_node.id == 'appstle_loyalty_iframe') { var iframe = document.querySelectorAll('#appstle_loyalty_iframe'); iframe.forEach(function(item) { item.contentWindow._ALConfig = _ALConfig; item.contentWindow.document.open('text/html', 'replace'); item.contentWindow.document.write(alIframeSrc); item.contentWindow.document.close(); }); alDOMObserver.disconnect(); } }); }); }); alDOMObserver.observe(document.querySelector('body'), { subtree: true, childList: true });

const dedicatedPageURL = new URL(window.location.href); if (dedicatedPageURL?.searchParams?.get('appstle_referral') && _ALConfig?.widget_setting?.widgetType === 'DEDICATED_PAGE' && !window.location.href.includes(_ALConfig?.proxy_path_prefix)) { window.open(`/${_ALConfig?.proxy_path_prefix}${window.location.search}`, '_self'); } const dedicatedPageEventListener = (event) => { if (event?.data && typeof event?.data.indexOf === 'function' && event?.data?.indexOf('refresh_appstle_loyalty_page') !== -1) { initiateAppstleLoyaltyPage() console.log("REFRESH PAGE"); } } window.addEventListener('message', dedicatedPageEventListener, false); function initiateAppstleLoyaltyPage() { if (document.querySelector('#appstleLoyaltyPage')) { const appstleLoyaltyPageElement = document.getElementById('appstleLoyaltyPage'); while (appstleLoyaltyPageElement.firstChild) { appstleLoyaltyPageElement.firstChild.remove(); } var s = document.createElement('script'); s.setAttribute('src', "https://loyalty-admin.appstle.com/app/loyalty-widget.bundle.js?v=1721911613160"); s.setAttribute('defer', 'defer'); document.body.appendChild(s); var head = document.head; var link = document.createElement('link'); link.type = 'text/css'; link.rel = 'stylesheet'; link.href = "https://loyalty-admin.appstle.com/content/loyalty-widget.css?v=1721911613160"; head.appendChild(link); } else { setTimeout(() => { initiateAppstleLoyaltyPage(); }, 2000); } } const checkDedicatedPageForRestrictions = () => { const { widget_setting, customerTags, customerLoyalty } = _ALConfig || {}; const { allowedCustomersTag, restrictedCustomersTag } = widget_setting || {}; const { customerStatus } = customerLoyalty || {}; if (customerStatus === 'EXCLUDED') { return false; } if (allowedCustomersTag?.length) { const allowedTags = allowedCustomersTag.split(','); if (!allowedTags.some(tag => customerTags?.includes(tag))) { return false; } } if (restrictedCustomersTag?.length) { const restrictedTags = restrictedCustomersTag.split(','); if (restrictedTags.some(tag => customerTags?.includes(tag))) { return false; } } return true; }; if (_ALConfig?.widget_setting?.showWidget === true && checkDedicatedPageForRestrictions()) { initiateAppstleLoyaltyPage(); }

(async function() { const isAvailableVisitShop = _ALConfig?.pointEarnRules?.length > 0 && _ALConfig?.pointEarnRules?.find((rule) => rule?.type === 'VISIT_SHOP' && rule?.status === 'ACTIVE'); if (!sessionStorage.getItem('syncVisitStore') && ((_ALConfig?.customerId && isAvailableVisitShop && isAvailableVisitShop?.id) || (_ALConfig?.referralEnabled && _ALConfig?.referralLoyalty?.referralType === 'VISIT_SHOP'))) { try { const response = await fetch(`/${_ALConfig?.proxy_path_prefix || 'apps/loyalty'}/cp/api/customer-visit-store`, { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ customerId: _ALConfig?.customerId }) }); if (response?.ok) { sessionStorage.setItem('syncVisitStore', 'true'); } } catch (error) { console.error('Error:', error); } } })();

const loyaltyCustomStyles = `

`; document.querySelector('body').insertAdjacentHTML('beforeend', loyaltyCustomStyles);

Cotswold Children’s Parties: Teddy Bear’s Picnic - Tuesday 22nd Octobe (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Jamar Nader

Last Updated:

Views: 6357

Rating: 4.4 / 5 (75 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.