{% endraw %}\"}", "bundle":{}, "labels":`{\"appstle.subscription.wg.cartHiddenAttributesSelectorV2\":\"\",\"appstle.subscription.wg.daysFrequencyTextV2\":\"Days\",\"appstle.subscription.wg.subscribeAndSaveSuccessV2\":\"Abonneren success\",\"appstle.subscription.wg.addToShipmentSuccessTextV2\":\"Success\",\"appstle.subscription.wg.monthFrequencyTextV2\":\"Maand\",\"appstle.subscription.wg.addToShipmentButtonTextV2\":\"Toevoegen aan Verzending\",\"appstle.subscription.wg.onetimeDescriptionTextV2\":\"\",\"appstle.subscription.wg.oneTimePurchaseTextV2\":\"Eenmalige aankoop\",\"appstle.subscription.wg.loyaltyPerkDescriptionTextV2\":\"{{#isDiscountTypeFreeProduct}}
<\/img><\/div>
Ontvang na {{{billingCycleBlock}}} bestellingen een GRATIS {{freeProductName}} <\/span><\/div>
{{\/isDiscountTypeFreeProduct}}{{#isDiscountTypePercentage}}Na {{{billingCycleBlock}}}<\/span> bestelling<\/span> ontvangt u {{{discount}}}% KORTING op uw gehele bestelling<\/span><\/span>.{{\/isDiscountTypePercentage}}{{#isDiscountTypeShipping}}Na {{{billingCycleBlock}}}<\/span> bestel<\/span>, ontvang verzending bij {{{formatDiscountedPrice}}}<\/span><\/span>.{{\/isDiscountTypeShipping}}{{#isDiscountTypeFixed}}Na {{{billingCycleBlock}}}<\/span> bestelling<\/span> krijgt u {{{formatDiscountedPrice}}} KORTING op uw gehele bestelling<\/span><\/span>.{{\/isDiscountTypeFixed}}\",\"appstle.subscription.wg.atcButtonTextSelectorV2\":\"\",\"appstle.subscription.wg.oneTimeFrequencyTextV2\":\"Eén Tijd\",\"appstle.subscription.wg.allowFulfilmentCountViaPropertiesV2\":\"false\",\"appstle.subscription.wg.valdiateFormSelector V2\":\"\",\"appstle.subscription.wg.monthsFrequencyTextV2\":\"Maanden\",\"appstle.subscription.wg.prepaidSaveBadgeTextV2\":\"OPSLAAN {{selectedDiscountPercentage}}\",\"appstle.subscription.wg.manageSubscriptionButtonTextV2\":\"Beheren Abonnement\",\"appstle.subscription.wg.yearFrequencyTextV2\":\"Jaar\",\"appstle.subscription.wg.widgetPriceChangeListenerS electorV2\":\"\",\"appstle.subscription.wg.atcButtonTextV2\":\"\",\"appstle.subscription.wg.noSubscriptionLabelTextV2\":\"Nee Abonnement\",\"appstle.subscription.wg.cancelAnytimeLabelTextV2\":\"Annuleren Altijd\",\"appstle.subscription.wg.addToShipmentErrorTextV2\":\"Fout\",\"appstle.subscription.wg.weeksFrequencyTextV2 \":\"Weken\",\"appstle.subscription.wg.weeklyLabelTextV2\":\"Wekelijks\",\"appstle.subscription.wg.displayAddToExistingSubs criptionButtonForNotLoggedInV2\":\"false\",\"appstle.subscription.wg.addToShipmentProcessingV2\":\"Verwerking...\",\"ap pstle.subscription.wg.showWidgetStaticV2\":\"false\",\"appstle.subscription.wg.deliveryEveryFrequencyTextV2\":\"Levering Elke\",\"appstle.subscription.wg.subscribeAndSaveInitalV2\":\"Abonneren en save\",\"appstle.subscription.wg.allowRefreshOnCartPageV2\":\"false\",\"appstle.subscription.wg.prepaidLabelTextV2\":\"Prepaid\",\"appstle.subscription.wg.monthlyLabelTextV2\":\"Maandelijks\",\"appstle.subsc ription.wg.displayAddToExistingSubscriptionButtonToSubscribersOnlyV2\":\"false\",\"appstle.subscription.wg.yearsFrequencyTextV2\":\"Jaren\",\"appstle.subscription.wg.addToShipmentTooltipTextV2\":\"Alsjeblieft vermijd dubbele bezorgkosten! Log in om dit product toe te voegen aan een aanstaande delivery.\",\"appstle.subscription.wg.weekFrequencyTextV2\":\"Week\",\"appstle.subscription.wg.unsubscribeFrequencyTextV2\":\"uitschrijven\",\"appstle.subscription.wg.widgetVariantChangeListenerSelectorV2\":\"\",\ "appstle.subscription.wg.atcButtonTextSelectorObserverV2\":\"\",\"appstle.subscription.wg.dayFrequencyTextV2\":\"dag\",\"appstle.subscription.wg.showPrepidPerDeliveryProductPriceV2\":\"false\",\"appstle.subscript ion.wg.offFrequencyTextV2\":\"Uit\",\"appstle.subscription.wg.prepayLabelTextV2\":\"Vooruitbetalen\",\"appstle.subscription.wg.productPageUnitPriceSelectorV2\":\"\",\"appstle.subscription.wg.frequencyCombinedWidgetTextV2 \":\"Frequentie\",\"appstle.subscription.wg.showNewLoyaltyUI\":\"false\",\"appstle.subscription.wg.sellingPlanTitleTextNonPrepaid\":\"{{sellingPlanName}}\",\"appstle.subscription.wg.selectDeliverOptionV2\":\"select deliver optie\",\"appstle.subscription.wg.yearlyLabelTextV2\":\"Jaarlijks\"}`, "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":"[]", "customCSS":"a.appstle_manageSubBtn {\n rand:2px effen #A94500 !important;\n}", "customerPortalCss":"", "externalStyleTag":"", "themeCss":"", } }; venster.AppstleSubscription =venster.AppstleSubscription || JSON.parse(JSON.stringify(RS)); sessionStorage['appstleSubscriptionConfig'] =JSON.stringify(RS.Config); try { window.appstle_build_a_box_labels ={"perDeliveryLabelTextV2":\\/delivery","variantNotAvailable"Niet beschikbaar","saveDiscountText"{{discount}}","bundleSummaryTextV2""Uw bundel is leeg. Voeg producten toe aan uw bundels om hier het bundeloverzicht te zien.","freeProductLabelTextV2""Gratis","bundleDescriptionTextV2""Onze bundel met alles bundels levert The Ultimate Superfood Bundle precies wat het belooft - een complete superfood-oplossing. Met 7 superfood-mengsels, elk gemaakt om elk aspect van uw gezondheid en welzijn te versterken - van immuniteit en darmgezondheid tot energie en betere focus.","productDetails"Productdetails","failedToAddMsgText"Uw winkelwagen kan niet meer dan {{maxProduct}} producten bevatten", "cart":"Winkelwagen", "reviewBundleTextV2" Bundel","addButtonText"Toevoegen"minimumQuantityToCheckoutV2"Minimumaantal van {{quantity}} om af te rekenen","buildBoxErrormsgV2"Build a Box-token is ongeldig. Neem contact op met de ondersteuning."continueShopping""Ga door met winkelen",failedToAddTitleText"Kan niet toevoegen"spendAmountGetDiscount""spendAmountGetDiscount"" Besteed {{amount}} en ontvang {{percent}}% discount","maxiumQuantityToCheckoutV2 'Maxiumaantal van {{quantity}} om af te rekenen', contentsOnModalTextV2 'Inhoud', 'nextStepButtonTextV2 'Volgende stap', 'choosePlanLifeStyleTextV2 'Kies een plan dat bij uw levensstijl past', 'selectMinimumProductButtonText', 'Selecteer een minimaal product van {{minProduct}}', 'subtotal':'Subtotaal', 'buyQuantityGetDiscount', 'Koop' {{quantity}} krijg {{percent}}% korting","loyaltyTablePercentageTextV2zzo:Na {{billingCycle}}<\\/span> bestelling<\\/span> krijgt u {{discount}}% korting<\\/span><\\/span>.","loyaltyTablePriceTextV2exception:Na {{billingCycle}}<\\/span> bestelling<\\/span>, ga naar {{price}}<\\/span><\\/span>.","myDeliveryText"Mijn {{selectedSellingPlanDisplayName}} levering","removeItem"Verwijderen","productsToProceedText"Selecteer producten om door te gaan","previousStepButtonTextV2"Vorige stap",loadMoreTextV2"Laad meer",selectedFrequencyLabelText"Geselecteerd Frequentie", "addToCartButtonTextV2":"Voeg toe aan winkelwagen", "basePriceFormatFieldV2":{{unitPrice}}\\/{{quantityUnit}}", title "Build-A-Box", productPriceFormatField "{{price}}", reviewOrdeDescriptionTextV2 "Controleer uw artikelen en selecteer de gewenste frequentie plan "quantityLabelV2" Aantal "minimumOrderAmountLabelTextV2" Minimum bestelbedrag {{minOrderAmount}}. checkout. "discountPopupCheckoutMessageV2" Korting "selectedButtonTextV2" Geselecteerd " congratsMessageText":null," okBtnText "Ok", "tieredDiscount "Gedifferentieerde korting", "choosePlanLifeStyleDescriptionTextV2" "Het uiterste tijdstip voor het wijzigen van uw maaltijden is elke week donderdag om middernacht (het bezorgschema is als volgt:Gold Coast - maandag | Brisbane en Sunshine Coast -). Wednesdays)","orderNoteLabelTextV2"Bestellingsopmerking", "minimumToCheckoutV2":Minimum {{quantity}} om af te rekenen","loyaltyTableFixedTextV2":Na {{billingCycle}}<\\/span> bestelling<\\/span>, krijgt u {{price}} korting<\\/span><\\/span>.","editQuantity:"Aantal bewerken", "chooseProductsTextV2":Kies Producten","loyaltyTableFreeProductTextV2zzo:Na {{billingCycle}}<\\/span> bestelling<\\/span> ontvangt u GRATIS PRODUCT ({{productName}})<\\/span><\\/span>.","loyaltyTableShippingTextV2exception:Na {{billingCycle}}<\\/span> bestelling<\\/span> kunt u verzenden op {{price}}<\\/span><\\/span>.","spentText":null,"quantityLabel":null,"addButtonV2exceptionadd","loyaltyTableFreeTrailTextV2 <
`; functie 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(); }); }; const launcherDataType =_ALConfig?.widget_setting?.launcherDataType || 'PUNTEN'; const loyaliteitButtonTitle =document.getElementById('loyalty-widget-title'); if (_ALConfig?.shop_labels?.widgetTitle) { loyaliteitButtonTitle.innerHTML =parseHtmlStringContent(_ALConfig?.shop_labels?.widgetTitle); } (function() { const { customerLoyalty, widget_setting } =_ALConfig || {}; if (!customerLoyalty) return; const showTier =widget_setting?.showTierName; const launcherButtonElement =document.querySelector('#appstle-loyalty-button'); const pointsEl =document.querySelector('.loyalty_widget_available_points'); if (!pointsEl) return; const fmt =new Intl.NumberFormat(); const { storeCreditBalance =0, beschikbare punten =0, currentVipTier ='' } =customerLoyalty; Getal(storeCreditBalance) || 0; displayValue =fmt.format(formatNumberByPointRoundType(n)); else if ((launcherDataType ==='VIP_TIER') &¤tVipTier) { displayValue =String(currentVipTier); fmt.format(formatNumberByPointRoundType(n)); puntenEl.textContent =displayValue; launcherButtonElement?.classList.add('appstle_show_points'); function handleDeepLink() {const loyaliteitDeepLinks =['#appstle-loyalty', '#appstle-refer', '#appstle-loyalty-earn-rewards', '#appstle-loyalty-redeem-rewards', '#appstle-loyalty-referrals', '#appstle-loyalty-vip-programma']; if (!_ALConfig?.widget_setting?.showWidget || !loyaltyDeepLinks.some(hash => locatie?.hash?.includes(hash))) { return; } loadAppstleLoyaltyWidget(); enableWidget(); setTimeout(() => {document.querySelector('#appstle_loyalty_iframe')?.classList?.add('show-close-icon'); }, 900); } handleDeepLink(); const widgetReferralUrl =nieuwe URL (window.location.href); if (_ALConfig?.referralEnabled &&widgetReferralUrl?.searchParams.get('appstle_referral') &&_ALConfig?.widget_setting?.widgetType ==='LAUNCHER') { let ReferralRedirectUrl =_ALConfig?.widget_setting?.referralRedirectUrl; laat redirectURL =verwijzingRedirectUrl + window.location.search; if (referralRedirectUrl) { laat verwijzingUrlObj; probeer {referralUrlObj =nieuwe URL (referralRedirectUrl, window.location.origin); } catch { verwijzingUrlObj =null; } laat verwijzingPath =verwijzingUrlObj? verwijzingUrlObj.padnaam.vervangen(/\/+$/, '') :verwijzingRedirectUrl.vervangen(/\/+$/, ''); laat currentPath =window.location.pathname.replace(/\/+$/, ''); if (verwijzingspad &&huidig pad !==verwijzingspad) { window.open(redirectURL, '_self'); } } setTimeout(() => {loadAppstleLoyaltyWidget();enableWidget(); }, 200); } (functie observerURLChanges() { let lastUrl =location.href; const handleUrlChange =() => { if (location.href !==lastUrl) { handleDeepLink(); lastUrl =location.href; } }; new MutationObserver(handleUrlChange).observe(document.body, { subboom:true, childList:true }); window.addEventListener('popstate', handleUrlChange); window.addEventListener('hashchange', handleUrlChange })(); 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'), subboom:true, childList:true });
} try { constversionUrl =`${location.origin}/${_ALConfig?.proxy_path_prefix || 'apps/loyalty'}/app-loyalty-versie`; fetch(versionUrl) .then(res => res.json()) .then(data => { if (data) { const widgetJsUrl =nieuwe URL(_ALConfig.widgetJsPath); const widgetCssUrl =nieuwe URL(_ALConfig.widgetCssPath); widgetJsUrl.searchParams.set('v', data); widgetCssUrl.searchParams.set('v', gegevens); _ALConfig.widgetJsPath =widgetJsUrl.toString(); _ALConfig.widgetCssPath =widgetCssUrl.toString(); } catch (fout) { executeLoyaltyWidget(); } const storeCreditMismatch =_ALConfig?.customerId &&_ALConfig?.customerStoreCreditBalance>=0 &&_ALConfig?.customerLoyalty?.storeCreditBalance>=0 &&_ALConfig?.customerLoyalty?.storeCreditBalance !==_ALConfig?.customerStoreCreditBalance; if (storeCreditMismatch &&_ALConfig.shop ==='olineloyalty27.myshopify.com') { const updateCustomerUrl =`/${_ALConfig?.proxy_path_prefix || 'apps/loyalty'}/cp/api/update-customer`; try { fetch(updateCustomerUrl, { method:'POST' }) .then((respons) => { if(response.ok) {} }) .catch(() => {}); } vangen (err) {} }
const dedicatedPageURL =nieuwe URL (window.location.href); const decodeUrl =(inhoud) => { if (type inhoud !=='string') inhoud retourneren; probeer { const htmlDecoded =inhoud?.replace(/\\\//g, '/'); return JSON.parse(`"${htmlDecoded}"`); } catch (fout) { console.error('Fout bij het parseren van inhoud:', fout); inhoud retourneren; } }; if (dedicatedPageURL?.searchParams?.get('appstle_referral') &&_ALConfig?.widget_setting?.widgetType ==='DEDICATED_PAGE') const customUrl =decodeUrl(_ALConfig?.widget_setting?.referralCustomRedirectUrl); if (customUrl) { const normalizedCustomPath =customUrl.startsWith('/') ? aangepasteUrl:`/${aangepastUrl}`; if (window.location.pathname !==normalizedCustomPath) { const redirectUrl =nieuwe URL (window.location.href); redirectUrl.pathname =genormaliseerdCustomPath; window.open(redirectUrl.toString(), '_self'); } } else 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 =(gebeurtenis) => { if (gebeurtenis?.data &&typeof gebeurtenis?.data.indexOf ==='functie' &&gebeurtenis?.data?.indexOf('refresh_appstle_loyalty_page') !==-1) { initialAppstleLoyaltyPage(); console.log('PAGINA VERNIEUWEN'); } }; window.addEventListener('bericht', dedicatedPageEventListener, false); function initialAppstleLoyaltyPage() { if (document.querySelector('#appstleLoyaltyPage')) { const appstleLoyaltyPageElement =document.getElementById('appstleLoyaltyPage'); while (appstleLoyaltyPageElement.firstChild) {appstleLoyaltyPageElement.firstChild.remove(); } if (appstleLoyaltyPageElement) { const executeDedicatedPageScript =() => { const s =document.createElement ('script'); s.setAttribute('src', _ALConfig?.widgetJsPath); s.setAttribute('uitstellen', 'uitstellen'); document.body.appendChild(s); const head =document.head; const link =document.createElement('link'); link.type ='tekst/css'; link.rel ='stijlblad'; link.href =_ALConfig?.widgetCssPath; hoofd.appendChild(link); } try { constversionUrl =`${location.origin}/${_ALConfig?.proxy_path_prefix || 'apps/loyalty'}/app-loyalty-versie`; fetch(versionUrl).then(res => res.json()).then(data => { if (data) { const widgetJsUrl =nieuwe URL(_ALConfig.widgetJsPath); const widgetCssUrl =nieuwe URL(_ALConfig.widgetCssPath); widgetJsUrl.searchParams.set('v', data); widgetCssUrl.searchParams.set('v', gegevens); _ALConfig.widgetJsPath =widgetJsUrl.toString(); _ALConfig.widgetCssPath =widgetCssUrl.toString(); } catch (fout) { executeDedicatedPageScript(); } } } else { setTimeout(() => { initialAppstleLoyaltyPage(); }, 2000); } } const dedicatedPageReferralUrl =nieuwe URL(window.location.href)?.searchParams.get('appstle_referral'); if (_ALConfig?.widget_setting?.showWidget ===waar) { initialAppstleLoyaltyPage();
(asynchrone functie() { const isAvailableVisitShop =_ALConfig?.pointEarnRules?.length> 0 &&_ALConfig?.pointEarnRules?.find((regel) => regel?.type ==='VISIT_SHOP' &®el?.status ==='ACTIEF'); if (_ALConfig?.customerId &&isAvailableVisitShop) { 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'}, }); sessionStorage.setItem('syncVisitStore', 'true'); } } catch (fout) { console.error('Fout:', fout);
`; document.querySelector('body').insertAdjacentHTML('beforeend', loyaliteitCustomStyles);