Herbal Tea Recipe for Heartburn and Acid Reflux (2024)

by Brier C.

Hey, SBA fam! You'll want to save this herbal tea recipe for the upcoming holiday season because... we all know we eat a little (or a lot) more treats, sweets, & goodies around the holiday season. With that can come a little more heartburn and/or acid reflux than we're used to! However, use this tea year-round for some extra help!

Before we get to it, let's hear from our Chelsea (Founder & CEO):

"The BEST tea for heartburn and/or acid reflux. These terms are often used interchangeably but acid reflux is the backflow of stomach contents into the esophagus. The feeling of acid reflux is heartburn, which is a mild burning sensation in the middle of the chest, often occurring after specific meals, when lying down, or if you're me, it happened quite a bit during my third trimester with Selah."

No need to use chemical-filled Tums or Pepto Bismol when you can make this potent and healthy tincture instead! As you read above, this tea is great for those who are pregnant and struggling with heartburn or acid reflux!

Okay, now onto the recipe which was written by Chelsea + recipe video!

Ingredients:

  • ***You can change the amounts but start with the blend below and go from there.
  • 2 tbsp spearmint
  • 1 tbsp ginger root (or a few fresh pieces, or both :))
  • 1 tbsp. marshmallow root
  • 1 tbsp. lemon balm
  • 1 tbsp. red raspberry leaf
  • Some honey!

Directions & Info:

  • Pour hot water over herbs (I use 200 degree water).
  • Let seep with the top on for about ten mins.
  • Press down, pour over some honey, and enjoy!
  • ****If you're wanting to buy organic dried leaves, frontier co-op is easy to purchase from on Amazon and they have a good selection of organic herbs.

Here to help,

Brier C. & Chelsea H. (Founder, CEO, & Herbalist)

Back to Blog

"); } if($(managesubscriptionSelector).length >= 0){ if(window.location.href.indexOf("account/login") > -1 || window.location.href.indexOf("account/register") > -1 ){ var account_url = ""; account_url = recurpay.domainURL + '/api/storefront/v2/customers/subscriptions/count?settings=true'; $.ajax({ url: account_url, type: 'GET', async:true, success: function(response){ if(response != "ERROR"){ if(response.settings !== null && !$.isEmptyObject(response.settings) && response.translations.breadcrumb_manage_subscription_link != undefined){ accountLoginHTML += ""+response.translations.breadcrumb_manage_subscription_link+""; } } $(managesubscriptionSelector).html(accountLoginHTML); } }); } }}loginPageSubscriptionLink();if($(accountSelector).length && recurpay.customer !== "guest"){ function recurAccount(count){ accountTemplate += '

' accountTemplate += '

' accountTemplate += '

'+recurpay.accountSettings.translations.breadcrumb_subscription_heading+' ('+count+')

' if(count !== 0){ accountTemplate += '

'+recurpay.accountSettings.translations.breadcrumb_subscription_description+'

' accountTemplate += '

'+recurpay.accountSettings.translations.breadcrumb_subscription_button_text+'

' } else{ accountTemplate += '

'+recurpay.accountSettings.translations.breadcrumb_subscription_placeholder_for_no_subscriptions+'

' accountTemplate += '

'+recurpay.accountSettings.translations.breadcrumb_subscription_text_for_no_subscriptions+'

' } accountTemplate += '

' return accountTemplate; } $.ajax({ url: recurpay.accountAPI+"?settings=true", type: 'GET', async:true, success: function(response){ var accountHTML = ''; if(response != "ERROR") { if(response.settings !== null && !$.isEmptyObject(response.settings)){ recurpay.accountSettings = response.settings; document.documentElement.style.setProperty('--recurpay_brand_color', recurpay.accountSettings.snippet_color_codes.account_brand_color); document.documentElement.style.setProperty('--recurpay_button_text_color', recurpay.accountSettings.snippet_color_codes.account_button_text_color); document.documentElement.style.setProperty('--recurpay_button_bg_color', recurpay.accountSettings.snippet_color_codes.account_button_color); } accountHTML = recurAccount(response.count); } else { accountHTML = recurAccount(0); } if($(accountSelector).length){ $(accountSelector).html(accountHTML); } }, error: function(jqXhr, textStatus, errorThrown){ console.log( errorThrown ); } }); $(document).on('click', subscriptionSelector, function(e) { e.preventDefault(); var checkoutForm = $("

"); $('body').append(checkoutForm); checkoutForm.submit(); }); } // CART PAGE function recurCart(cartData){ var checkoutData = [], cartItems = cartData.items, cartAttributes = [], cartNote = cartData.note, recurpayCheckout = false; $.each( cartData.attributes, function(key, value ) { if(key != "Plan" && key != '_PlanId'){ cartAttributes.push({ name: key, value:value }); } }); for(var i=0; i < cartItems.length; i++){ var Planid = '', item = cartItems[i], property = item.properties, lineProperty = []; if(property){ if(property._PlanId){ Planid = property._PlanId recurpayCheckout = true; } $.each( property, function(key, value ) { if(key != "Plan" && key != '_PlanId'){ lineProperty.push({ name: key, value:value }); } }); } if(Planid == ''){ checkoutData.push({ quantity: item.quantity, variant_id: item.id, properties: lineProperty, type: 'ONETIME', currency:'INR' }); } else{ checkoutData.push({ quantity: item.quantity, variant_id: item.id, properties: lineProperty, plan_id: Planid, type: 'SUBSCRIPTION', currency:'INR' }); } } if(recurpayCheckout) { var getCheckoutData = JSON.stringify(checkoutData), getCartAttributes = JSON.stringify(cartAttributes), cartNote = $('[name="note"]').val(); checkoutForm = $("

"); $('body').append(checkoutForm); checkoutForm.submit(); } else { document.location.href = "/checkout"; } } // VARIANT SELECTOR function getProductHandle(href) { if (typeof href === "undefined") { var href = window.location.href; href = href.replace("/products/products", "/products"); } if (/\/products\/([^\?\/\n]+)/.test(href)) { var found = href.match(/\/products\/([^\?\/\n]+)/); if (typeof found[1] !== "undefined") { try { return decodeURIComponent(found[1]).replace("#", ""); } catch (e) { return found[1].replace("#", ""); } } } return false; } recurpay.recurMoney = { formatPrice: function (price, convertCurrency) { if (typeof Shopify !== "undefined" && Shopify.hasOwnProperty("currency") && Shopify.currency.hasOwnProperty("rate")) { var currency = Shopify.currency.active; var exchangeRate = Shopify.currency.rate; var moneyFormat = "" + currency; var currencyFormat = ""; if (typeof convertCurrency === "undefined") { convertCurrency = false; } if (convertCurrency && exchangeRate !== "1.0") { price = this.convertMoney(price, exchangeRate, currency); } var bodyAttrMoneyFormat = $("body").attr("data-money-format"); if (currencyFormat !== "") { moneyFormat = currencyFormat; } else { if (typeof Shopify !== "undefined" && typeof Shopify.currency_settings !== "undefined" && typeof Shopify.currency_settings.money_format !== "undefined") { moneyFormat = Shopify.currency_settings.money_format; } else if (typeof window.money_format !== "undefined") { moneyFormat = window.money_format; } else if (typeof window.Theme !== "undefined" && typeof window.Theme.moneyFormat !== "undefined") { moneyFormat = window.Theme.moneyFormat; } else if (typeof window.theme !== "undefined" && typeof window.theme.moneyFormat !== "undefined") { moneyFormat = window.theme.moneyFormat; } else if (typeof window.theme !== "undefined" && typeof window.theme.money_format === "string") { moneyFormat = window.theme.money_format; } else if (typeof window.theme !== "undefined" && typeof window.theme.settings !== "undefined" && typeof window.theme.settings.moneyFormat !== "undefined") { moneyFormat = theme.settings.moneyFormat; } else if (typeof window.theme !== "undefined" && typeof window.theme.strings !== "undefined" && typeof window.theme.strings.moneyFormat === "string") { moneyFormat = window.theme.strings.moneyFormat; } else if (typeof window.Currency !== "undefined" && typeof window.Currency.money_format !== "undefined" && typeof window.Currency.money_format[currency] === "string") { moneyFormat = window.Currency.money_format[currency]; } else if (typeof window.Currency !== "undefined" && typeof window.Currency.money_format === "string") { moneyFormat = window.Currency.money_format; } else if (typeof bodyAttrMoneyFormat !== "undefined" && typeof bodyAttrMoneyFormat === "string" && bodyAttrMoneyFormat !== "") { moneyFormat = bodyAttrMoneyFormat; } else if (typeof wsgMoneyFormat === "string") { moneyFormat = wsgMoneyFormat; } else if (typeof price_format === "string") { moneyFormat = price_format; } else { price = price / 100; return price.toLocaleString(undefined, { style: "currency", currency: currency || this.getDefaultCurrency() }); } } return this.formatMoney(price, moneyFormat, currency || this.getDefaultCurrency()); } return ""; }, formatMoney: function (cents, format, fallbackCurrency, directionFor50) { if (typeof directionFor50 === "undefined") { var directionFor50 = "up"; } try { if (typeof cents == "string") { cents = cents.replace(".", ""); } var value = ""; var placeholderRegex = /\{\{\s*(\w+)\s*\}\}/; var formatString = format; function defaultOption(opt, def) { return typeof opt == "undefined" ? def : opt; } function formatWithDelimiters(number, precision, thousands, decimal, directionFor50) { precision = defaultOption(precision, 2); thousands = defaultOption(thousands, ","); decimal = defaultOption(decimal, "."); directionFor50 = defaultOption(directionFor50, "up"); if (isNaN(number) || number == null) { return 0; } var originalNumber = number; number = (number / 100.0).toFixed(precision); if (directionFor50 === "down") { if (originalNumber / 100 - number === -0.5) { number -= 1; number = number.toString(); } } var parts = number.split("."), dollars = parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + thousands), cents = parts[1] ? decimal + parts[1] : ""; return dollars + cents; } switch (formatString.match(placeholderRegex)[1]) { case "amount": value = formatWithDelimiters(cents, 2); break; case "amount_no_decimals": value = formatWithDelimiters(cents, 0, ",", ".", directionFor50); break; case "amount_with_comma_separator": value = formatWithDelimiters(cents, 2, ".", ","); break; case "amount_with_decimal_separator": value = formatWithDelimiters(cents, 2, ",", "."); break; case "amount_no_decimals_with_comma_separator": value = formatWithDelimiters(cents, 0, ".", ",", directionFor50); break; case "amount_no_decimals_with_space_separator": value = formatWithDelimiters(cents, 0, " ", ",", directionFor50); break; case "amount_with_apostrophe_separator": value = formatWithDelimiters(cents, 2, "'", "."); break; } return formatString.replace(placeholderRegex, value); } catch (e) { console.log(e.message); price = cents / 100; return price.toLocaleString(undefined, { style: "currency", currency: fallbackCurrency }); } }, convertMoney: function (value, rate, currency, round) { if (value <= 0) { return 0; } value *= rate; var roundUp = ["USD", "CAD", "AUD", "NZD", "SGD", "HKD", "GBP"]; var roundTo100 = ["JPY"]; var roundTo95 = ["EUR"]; if (round) { if (roundUp.indexOf(currency) !== -1) { value = Math.ceil(value); } else if (roundTo100.indexOf(currency) !== -1) { value = Math.ceil(value / 100) * 100; } else if (roundTo95.indexOf(currency) !== -1) { value = Math.ceil(value) - 0.05; } } return value; } }; function calculatePrice(variant_id){ var variant_json = {}; var variant_price = 0; var productObj = {}; if(variant_id !== undefined && variant_id !== null){ variant_id = parseInt(variant_id); let variant_data = []; for(i=0 ; i< recurpay.productDatas.length; i++){ variant_data.push(...recurpay.productDatas[i].product.variants.filter(function(searchId) { return parseInt(searchId.id) == variant_id; })); console.log(variant_data); } if(variant_data.length >=1){ productObj.variant_price = variant_data[0].price; productObj.variant_title = variant_data[0].title; productObj.product_id = variant_data[0].product_id; } } else{ productObj.variant_price = recurpay.productDatas[0].product.variants[0].price; productObj.variant_price = recurpay.productDatas[0].product.variants[0].title; productObj.product_id = variant_data[0].product_id; } return productObj; } function formatPriceMoney(price){ var multiple_price = price*100; var formatted_price = recurpay.recurMoney.formatPrice(multiple_price); return formatted_price; } // $(atcFormSelector).closest(".product__meta").find("button.product__chip").on("click", function () { // var $this = $(this); // setTimeout(function() { // recurpay.product.selectedVariant = $this.parents(atcFormSelector).find('select[name="id"]').val(); // recurDiscountedPrice(recurpay.product.selectedVariant); // },100); // }); // $(atcFormSelector).find(".combobox, .wetheme-dropdown__wrapper ul[id^='SingleOptionSelector-'] li, .option-values-radio .popover-list-item .form-element-radio, .single-option-selector .bcpo-image-parent, .regular-select-item, .bcpo-dd.single-option-selector ul.inner li, #clickyboxes-SingleOptionSelector-0 a, button.product__chip, .form-swatch-item, .product-variant__container .product-variant__label, .options-selection__option-value, .popout-list__option--product, .option-swatch .custom-swatch, ul.select-dropdown li, .swatch-element, .swatch_pr_item, .basel-swatch, .swatchBox label, .swatchBox span").on("click", function () { // var $this = $(this); // setTimeout(function() { // recurpay.product.selectedVariant = $this.parents(atcFormSelector).find('select[name="id"], input[name="id"][type="radio"]:checked').val(); // recurDiscountedPrice(recurpay.product.selectedVariant); // },100); // }); // $(atcFormSelector).closest(".product-selection").find("select.single-option-selector").on("change", function () { // var $this = $(this); // setTimeout(function() { // recurpay.product.selectedVariant = $this.parents(atcFormSelector).find('select[name="id"]').val(); // recurDiscountedPrice(recurpay.product.selectedVariant); // },100); // }); // $(atcFormSelector).find(".product-single__swatch__input").on("change", function () { // var $this = $(this); // setTimeout(function() { // recurpay.product.selectedVariant = $this.parents(atcFormSelector).find('select[name="id"]').val(); // recurDiscountedPrice(recurpay.product.selectedVariant); // },100); // }); // $(atcFormSelector).find('input#SelectedId, select.js-variant-select, input[name="id"], select[name="id"], select.single-option-selector, .zpa-single-option-selector, .select.options-selection__input-select, .form-options input.option-value-input, .variant-input input[type="radio"], .product-form__option-select, .option-selectors .selector-wrapper select, select.single-option-list-type, .product-options .option-input, select.input-reset, select.js-product-variant, select[data-single-option-selector], input[data-single-option-selector], select.single-option-selector-product-template, .single-option-selector[type="radio"], .single-option-selector-product-template[type="radio"]').on("change", function () { // var $this = $(this) // setTimeout(function() { // console.log( $(this)); // console.log($(this).parents(atcFormSelector)); // recurpay.product.selectedVariant = $this.parents(atcFormSelector).find('input[name="id"], select[name="id"], input#SelectedId').val(); // recurDiscountedPrice(recurpay.product.selectedVariant); // },100); // }); function fetchVariants(){ if(getProductHandle() !== false){ var productURL = "/products/"+getProductHandle()+".json"; $.ajax({ url: productURL, type: 'GET', success: function(response){ recurpay.productDatas[0].product.variants = response.product.variants; recurDiscountedPrice(recurpay.product.selectedVariant); }, error: function(jqXhr, textStatus, errorThrown){ console.log( errorThrown ); } }); } } function recurDiscountedPrice(variant){ var getVariantObj = calculatePrice(variant); console.log("----") console.log(getVariantObj) console.log("----") var getVariantTitle = getVariantObj.variant_title; var getVariantPrice = getVariantObj.variant_price; var getProductId = parseInt(getVariantObj.product_id); $('.recurpay-pdp-widget[data-product-id="'+getProductId+'"]').find(".recurpay__frequency_select option").each(function(){ var $this = $(this); console.log($this); var getDiscount = $(this).attr("data-plan-discount"); var getPlanName = $(this).attr("data-plan-name"); var getPlanShipment = $(this).attr("data-plan-shipment"); if(getPlanShipment == null || getPlanShipment == undefined || getPlanShipment == "null"){ getPlanShipment = 1; } if(getDiscount == null || getDiscount == undefined || getDiscount == "null"){ getDiscount = 0; } var discountedPrice = getVariantPrice - (getVariantPrice * getDiscount / 100); if(parseFloat(getVariantPrice) !== parseFloat(discountedPrice)){ $this.html(getPlanName+" ("+formatPriceMoney(discountedPrice*getPlanShipment)+")"); console.log( $('.recurpay-pdp-widget[data-product-id="'+getProductId+'"]')); if($this.is(':selected')){ $('.recurpay-pdp-widget[data-product-id="'+getProductId+'"]').find(".recurpay__widget_container[data-type='subscription-purchase']").find(".recurpay__group_compare_price").html(""+formatPriceMoney(getVariantPrice*getPlanShipment)+""); } } else{ $this.html(getPlanName+"("+formatPriceMoney(discountedPrice*getPlanShipment)+")"); if($this.is(':selected')){ $('.recurpay-pdp-widget[data-product-id="'+getProductId+'"]').find(".recurpay__widget_container[data-type='subscription-purchase']").find(".recurpay__group_compare_price").html(""); } } if($this.is(':selected')){ $('.recurpay-pdp-widget[data-product-id="'+getProductId+'"]').find(".recurpay__widget_container[data-type='subscription-purchase']").find(".recurpay__group_selling_price").html(""+formatPriceMoney(discountedPrice*getPlanShipment)+""); } $('.recurpay-pdp-widget[data-product-id="'+getProductId+'"]').find(".recurpay__widget_container[data-type='onetime-purchase']").find(".recurpay__group_selling_price").html(""+formatPriceMoney(getVariantPrice)+""); }); console.log(getVariantTitle); if(getVariantTitle.indexOf("sample") != -1 || getVariantTitle.indexOf("Sample") != -1){ console.log("yes") $('.recurpay-pdp-widget').hide(); } else{ console.log("no") $('.recurpay-pdp-widget').show(); } } var getLastUrl = location.href; new MutationObserver(() => { var getUrl = location.href; if (getUrl !== getLastUrl) { getLastUrl = getUrl; onUrlChange(); } }).observe(document, {subtree: true, childList: true}); function onUrlChange() { debugger; var getSearchParams = new URLSearchParams(window.location.search) if(getSearchParams.has('variant')){ recurpay.product.selectedVariant = getSearchParams.get('variant'); recurDiscountedPrice(recurpay.product.selectedVariant); } } // PRODUCT PAGE function recurPDP(data){ var prepaidCount = 0, regularCount = 0, prepaidDiscount = [], maxPrepaidDiscount = '', getPlanDesc = '', pdpTemplate = '', GetPlans = ""; $.each(data.plans, function(key, plan) { var DiscountPercentageHtml = '', DescriptionHtml = '', PlanHtml = '', PlanDiscount = 0, PlanType = 'regular'; if(plan.type){ PlanType = plan.type; if(PlanType == 'prepaid'){ prepaidCount += prepaidCount+1; prepaidDiscount.push(plan.pricing_policy[0].discount.value); } else{ regularCount += regularCount+1; } } if(plan.pricing_policy[0].discount.type == "percentage" && plan.pricing_policy[0].discount.value != 0){ PlanDiscount = plan.pricing_policy[0].discount.value; DiscountPercentageHtml = '(' + PlanDiscount + '% Off)'; } if(plan.description) { DescriptionHtml = '

'; } if(recurpay.checkout == "shopify"){ if(key == 0){ PlanHtml += '

' } else{ PlanHtml += '

' } } else{ if(key == 0){ PlanHtml += '

' } else{ PlanHtml += '

' } } GetPlans += PlanHtml; getPlanDesc += DescriptionHtml; }) if(regularCount > 0 && prepaidCount >0){ maxPrepaidDiscount = Math.max.apply(Math,prepaidDiscount); } pdpTemplate += '

' pdpTemplate += '

' pdpTemplate += '' pdpTemplate += '

' pdpTemplate += '

' pdpTemplate += '

' pdpTemplate += '

'+recurpay.settings.translations.premium_onetime_label+'

' pdpTemplate += '

' pdpTemplate += '

' pdpTemplate += '

' pdpTemplate += '' pdpTemplate += '

' pdpTemplate += '

' pdpTemplate += '

'+recurpay.settings.translations.premium_subscription_label+'

' pdpTemplate += '

'+recurpay.settings.translations.premium_subscription_label_description+'

' pdpTemplate += '

' pdpTemplate += '

' pdpTemplate += '

' pdpTemplate += '

'+recurpay.settings.translations.premium_frequency_dropdown_label+'

' pdpTemplate += '' pdpTemplate += '

'+getPlanDesc+'

' pdpTemplate += '

' pdpTemplate += ''; pdpTemplate += ''; if(recurpay.checkout == "shopify"){ pdpTemplate += ''; } return pdpTemplate; } if($(pdpSelector).length <= 0){ if (window.location.href.indexOf("/products/") > -1) { if($(atcFormSelector).find(atcSelector).filter(':visible').length){ if($(atcFormSelector).find(atcSelector).filter(':visible').first().parent().css('display') == 'flex' && $(atcFormSelector).find(atcSelector).filter(':visible').first().parent().css('flex-direction') == 'row'){ $(atcFormSelector).find(atcSelector).filter(':visible').first().parent().before('

'); } else{ $(atcFormSelector).find(atcSelector).filter(':visible').first().before('

'); } if($(pdpSelector).parent().css('position') == 'fixed' || $(pdpSelector).parent().css('position') == 'sticky' || $(pdpSelector).parent().css('position') == 'absolute' ){ $(pdpSelector).parent().addClass("recurpay-z-index"); } } else if($(atcFormSelector).find(atcSelector).length){ if($(atcFormSelector).find(atcSelector).first().parent().css('display') == 'flex' && $(atcFormSelector).find(atcSelector).filter(':visible').first().parent().css('flex-direction') == 'row'){ $(atcFormSelector).find(atcSelector).first().parent().before('

'); } else{ $(atcFormSelector).find(atcSelector).first().before('

'); } if($(pdpSelector).parent().css('position') == 'fixed' || $(pdpSelector).parent().css('position') == 'sticky' || $(pdpSelector).parent().css('position') == 'absolute' ){ $(pdpSelector).parent().addClass("recurpay-z-index"); } } else{ $(atcFormSelector).append('

') } } } if($(pdpSelector).length){ recurpay.allProducts = []; for(i=0; i<$(pdpSelector).length; i++){ if($(pdpSelector).eq(i).attr("data-product-id") != undefined && $(pdpSelector).eq(i).attr("data-product-available") != undefined ){ recurpay.allProducts.push($(pdpSelector).eq(i).attr("data-product-id")); } } $.ajax({ url: recurpay.pdpAPI, type: 'POST', async:true, data: {"products": recurpay.allProducts,"settings": true}, success: function(response) { if(response != "ERROR") { if(response.plans.length > 0){ recurpay.productDatas = response.plans; if(response.settings.translations !== null && !$.isEmptyObject(response.settings.translations)){ recurpay.settings = response.settings; document.documentElement.style.setProperty('--recurpay_brand_color', recurpay.settings.snippet_color_codes.subscription_brand_color); document.documentElement.style.setProperty('--recurpay_button_text_color', recurpay.settings.snippet_color_codes.subscription_button_text_color); document.documentElement.style.setProperty('--recurpay_button_bg_color', recurpay.settings.snippet_color_codes.subscription_button_color); } $(response.plans).each(function(){ var pdpHTML = ''; var $this = $(this); if($this[0].product.plans.length >0){ pdpHTML = recurPDP($this[0].product); var getElem = $('.recurpay-pdp-widget[data-product-id="'+$this[0].product.id+'"]'); if($(getElem).length && $(getElem).attr("data-product-available") == "true"){ $(getElem).html(pdpHTML); if($(getElem).attr("data-only-subscription") == "true"){ $(getElem).find(".recurpay__widget[data-recurpay-widget]").addClass("recurpay_only_subscription_widget"); } if((window.location.href.indexOf("/products/") > -1) && (window.location.href.indexOf("snippet_status=false") > -1)){ $(getElem).before("You are previewing subscriptions currently and the option below is not visible to customers on your live store. Click here if you are ready to show it your customers now.") } } var params = new Proxy(new URLSearchParams(window.location.search), { get: (searchParams, prop) => searchParams.get(prop), }); if(params.variant !== undefined && params.variant !== null){ var variant_id = parseInt(params.variant); let variant_data = []; variant_data.push(...$this[0].product.variants.filter(function(searchId) { return parseInt(searchId.id) == variant_id; })); if(variant_data.length >=1){ recurpay.product.selectedVariant = params.variant recurDiscountedPrice(recurpay.product.selectedVariant); } else{ recurpay.product.selectedVariant = $this[0].product.variants[0].id; recurDiscountedPrice($this[0].product.variants[0].id); } } else{ if(recurpay.product.availableVariant !== "" && recurpay.product.availableVariant !== undefined){ recurpay.product.selectedVariant = recurpay.product.availableVariant; recurDiscountedPrice(recurpay.product.availableVariant); } else{ recurpay.product.selectedVariant = $this[0].product.variants[0].id; recurDiscountedPrice($this[0].product.variants[0].id); } } } }); if(response.settings.sell_only_as_subscription !== undefined && response.settings.sell_only_as_subscription !== null){ if(response.settings.sell_only_as_subscription == true){ updateSelectors(true); } else{ updateSelectors(); } } } } } }); } else{ if((window.location.href.indexOf("/products/") > -1) && (window.location.href.indexOf("recurpay_preview=true") > -1)){ var modalHTML = ""; modalHTML += '

' modalHTML += '

' modalHTML += '

' modalHTML += '

' modalHTML += '

' modalHTML += '

' modalHTML += '

' modalHTML += '

' modalHTML += '

' modalHTML += 'Note: This is not visible to your customers' modalHTML += '

' modalHTML += '

' modalHTML += '

' modalHTML += '

Looks like the subscription option is not visible on your store due to some conflict with theme. Talk to us on Live Chat to get it resolved instantly

' modalHTML += '

' modalHTML += '

' modalHTML += '' modalHTML += '' modalHTML += '

' if($('[data-recurpay-visibility-modal]').length <= 0){ if($('body').length){ $('body').append(modalHTML); } else if($('html').length){ $('html').append(modalHTML); } } } } function recurProperties(elem){ var getParent = $(elem).parents(pdpSelector); if( $(getParent).find("[name='recurpay__group_main'][value='subscription']").is(":checked")){ var planName = $(getParent).find('[name="recurpay-input"] option:selected').attr('data-plan-name'), planId = $(getParent).find('[name="recurpay-input"] option:selected').attr('data-plan'); $(getParent).find('.recurpay_plan_name').attr("name","properties[Plan]").val(planName); $(getParent).find('.recurpay_plan_id').attr("name","properties[_PlanId]").val(planId); $(getParent).find('.recurpay__description[data-description-id]').hide(); $(getParent).find('.recurpay__description[data-description-id="'+planId+'"]').show(); if(recurpay.checkout == "shopify"){ var sellingPlanId = $(getParent).find('[name="recurpay-input"] option:selected').attr('data-selling-plan'); $(getParent).find('.recurpay_selling_plan_id').attr("name","selling_plan").val(sellingPlanId); } } else{ $(getParent).find('.recurpay_plan_name').attr("name",""); $(getParent).find('.recurpay_plan_id').attr("name",""); if(recurpay.checkout == "shopify"){ $(getParent).find('.recurpay_selling_plan_id').attr("name",""); } } } function addSubscription(btn){ var variantSelector = $(btn).parents(atcFormSelector).find('[name="id"]'), quantitySelector = $(btn).parents(atcFormSelector).find('[name="quantity"]'), subscriptionPlanId = $(btn).parents(pdpSelector).find('[name="recurpay-input"] option:selected').attr('data-plan'), subscriptionPlanName = $(btn).parents(pdpSelector).find('[name="recurpay-input"] option:selected').attr('data-plan-name'), subscriptionPlanType = $(btn).parents(pdpSelector).find('[name="recurpay-input"] option:selected').attr('data-plan-type'), planVariant = parseInt(variantSelector.val()), planQuantity = 1, planParams = {}; if(quantitySelector.length) { planQuantity = parseInt(quantitySelector.val()); } if(recurpay.checkout == "shopify"){ var sellingPlanId = $(btn).parents(pdpSelector).find('[name="recurpay-input"] option:selected').attr('data-selling-plan'); planParams = { id: planVariant, quantity: planQuantity, selling_plan: sellingPlanId, properties: { 'Plan': subscriptionPlanName, '_PlanId': subscriptionPlanId } } } else{ planParams = { id: planVariant, quantity: planQuantity, properties: { 'Plan': subscriptionPlanName, '_PlanId': subscriptionPlanId } } } if(recurpay.checkout == "recurpay" && !recurpay.prepaidMixedCart && subscriptionPlanType == "prepaid"){ $.getJSON('/cart', function(response) { response.items = []; response.items.push(planParams); recurCart(response); }); } else{ if (recurpay.action == "default" && $(atcFormSelector).find(atcSelector).length){ $(btn).parents(atcFormSelector).find(atcSelector).first().click(); } else{ $.ajax({ type: 'POST', url: '/cart/add.js', dataType: 'json', data: planParams, success: function() { if (recurpay.checkout == "recurpay" && recurpay.action == "checkout"){ $.getJSON('/cart', function(response) { recurCart(response); }); } else if(recurpay.action == "cart"){ document.location.href = '/cart'; } else{ document.location.href = '/checkout'; } }, error: function(xhr, status, error) { var err = eval("(" + xhr.responseText + ")"); $('[data-recurpay-error]') .html(err.description) .show().delay(3000).fadeOut(); } }); } } } $(document).on('change',"[name='recurpay__group_main']", function(e) { var $this = $(this); $this.parents(pdpSelector).find('.recurpay__widget_container').removeClass("recurpay__widget_container--selected"); var checkVal = $this.val(); if($this.is(":checked")){ $this.parents('.recurpay__widget_container').addClass("recurpay__widget_container--selected"); } if(checkVal == "subscription"){ $this.parents(atcFormSelector).find(atcSelector).addClass("recurpay-hide"); $this.parents(atcFormSelector).find(buynowSelector).addClass("recurpay-hide"); $this.parents(pdpSelector).find('.recurpay__plans').show(); $this.parents(pdpSelector).find('.recurpay__group_content_wrapper').slideDown(); } else{ $this.parents(atcFormSelector).find(atcSelector).removeClass("recurpay-hide"); $this.parents(atcFormSelector).find(buynowSelector).removeClass("recurpay-hide"); $this.parents(pdpSelector).find('.recurpay__plans').hide(); $this.parents(pdpSelector).find('.recurpay__group_content_wrapper').slideUp(); } recurProperties($this); }); $(document).on('change',"[name='recurpay-input']", function(e) { var getId = $(this).parents(atcFormSelector).find('input[name="id"], select[name="id"], input#SelectedId').val(); recurDiscountedPrice(getId); recurProperties($(this)); }); $(document).on('click',".recurpay__group_label", function(e) { $(this).parents('.recurpay__widget_container').find('[name="recurpay__group_main"]').prop("checked",true).change(); }); $(document).on('click',".recurpay-modal-cancel-btn", function(e) { $('[data-recurpay-visibility-modal]').hide(); }); function updateSelectors(only_subscription){ for(r=0; r<$(pdpSelector).length; r++){ if($(pdpSelector).eq(r).attr("data-only-subscription") == "true" || only_subscription == true){ $(pdpSelector).eq(r).attr("data-only-subscription",true); $(pdpSelector).eq(r).find(".recurpay__widget[data-recurpay-widget]").addClass("recurpay_only_subscription_widget"); $(pdpSelector).eq(r).find("[name='recurpay__group_main'][value='subscription']").prop("checked",true).change(); } $(pdpSelector).eq(r).parents(atcFormSelector).css({"flex-direction":"column", "align-items":"flex-start"}); $(pdpSelector).eq(r).parents(atcFormSelector).find("input[name='quantity']").css({"width":"50%"}); $(pdpSelector).eq(r).parents(atcFormSelector).find('.selector-wrapper').css("flex", "1 1 100px"); } } $(document).on('click',"[data-recurpay-action]", function(e) { addSubscription($(this)); }); if(recurpay.checkout == "recurpay"){ $(document).on('click', checkoutSelector, function(e) { e.preventDefault(); e.stopPropagation(); $.getJSON('/cart', function(response) { recurCart(response); }) }); if($(recurpay.checkout_btn_override_class).length){ document.addEventListener("click", handler, true); function handler(e) { if($(e.target).is(recurpay.checkout_btn_override_class)){ e.stopPropagation(); e.preventDefault(); $.getJSON('/cart', function(response) { recurCart(response); }); } } } } } //Append jQuery if it is not there, then call to recurpaySubscription //Otherwise directly call to recurpaySubscription if ((typeof(jQuery) == 'undefined')) { initScript('//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js', function() { window.recurpayScript = jQuery.noConflict(true); recurpaySubscription(recurpayScript); }) } else { recurpaySubscription(jQuery); } })();

Herbal Tea Recipe for Heartburn and Acid Reflux (2024)

References

Top Articles
Latest Posts
Article information

Author: Clemencia Bogisich Ret

Last Updated:

Views: 5754

Rating: 5 / 5 (80 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Clemencia Bogisich Ret

Birthday: 2001-07-17

Address: Suite 794 53887 Geri Spring, West Cristentown, KY 54855

Phone: +5934435460663

Job: Central Hospitality Director

Hobby: Yoga, Electronics, Rafting, Lockpicking, Inline skating, Puzzles, scrapbook

Introduction: My name is Clemencia Bogisich Ret, I am a super, outstanding, graceful, friendly, vast, comfortable, agreeable person who loves writing and wants to share my knowledge and understanding with you.