Codeage Liposomal Multi Amino+ powder supplement contains all nine essential amino acids and uses a liposomal delivery system to help enhance absorption and bioavailability.* This plant-based protein supplement is a comprehensive amino acid formula that serves as both a BCAA supplement (branched-chain amino acid) and an EAA supplement (essential amino acid) powder. EAAs are all 9 essential amino acids that cannot be produced by the body and must be obtained through diet or supplementation.
Codeage Liposomal Multi Amino+ powder supplement is a comprehensive blend that contains all 9 essential amino acids, the building blocks of protein that are important for supporting health and functionality.* These amino acids cannot be produced by the body, which is why they need to be obtained through diet or supplementation.
This BCAA powder (branched-chain amino acid) and EAA powder (essential amino acid) supplement utilizes a liposomal delivery system to help enhance the bioavailability of the amino acids. Codeage EAA supplement formula provides L-Leucine, L-Lysine HCL, L-Isoleucine, L-Valine, L-Threonine, L-Phenylalanine, L-Methionine, L-Histidine, L-Cystine, L-Tyrosine in their free-form, as well as L-Tryptophan.
Codeage Liposomal Multi Amino+ powder is vegan, non-GMO, soy-free, dairy-free, and gluten-free, making it suitable for those with dietary restrictions or sensitivities. This BCAA supplement is also free from artificial colors, flavors, and preservatives, making it a pure choice for amino acid supplementation.
Each bottle of Codeage Liposomal Multi Amino+ BCAA protein supplement provides 30 servings for 1 month of supply of amino acids. This powder comes unflavored and can be mixed to prepare BCAA drinks. It can also be used as a BCAA pre-workout formula. This supplement is ideal for adults of all ages and can be taken daily as a powder supplement to support muscle health and overall well-being.*
Codeage amino acid and BCAA energy support formula is manufactured in a cGMP-certified facility in the USAwith global ingredients for quality and purity. This formula also exists in a capsule format.
Codeage Liposomal Multi Amino+ powder supplement is a comprehensive blend that contains all 9 essential amino acids, the building blocks of protein that are important for supporting health and functionality.* These amino acids cannot be produced by the body, which is why they need to be obtained through diet or supplementation.
This BCAA powder (branched-chain amino acid) and EAA powder (essential amino acid) supplement utilizes a liposomal delivery system to help enhance the bioavailability of the amino acids. Codeage EAA supplement formula provides L-Leucine, L-Lysine HCL, L-Isoleucine, L-Valine, L-Threonine, L-Phenylalanine, L-Methionine, L-Histidine, L-Cystine, L-Tyrosine in their free-form, as well as L-Tryptophan.
Codeage Liposomal Multi Amino+ powder is vegan, non-GMO, soy-free, dairy-free, and gluten-free, making it suitable for those with dietary restrictions or sensitivities. This BCAA supplement is also free from artificial colors, flavors, and preservatives, making it a pure choice for amino acid supplementation.
Each bottle of Codeage Liposomal Multi Amino+ BCAA protein supplement provides 30 servings for 1 month of supply of amino acids. This powder comes unflavored and can be mixed to prepare BCAA drinks. It can also be used as a BCAA pre-workout formula. This supplement is ideal for adults of all ages and can be taken daily as a powder supplement to support muscle health and overall well-being.*
Codeage amino acid and BCAA energy support formula is manufactured in a cGMP-certified facility in the USAwith global ingredients for quality and purity. This formula also exists in a capsule format.
Adults mix 1 scoop daily, or as recommended by your healthcare practitioner, with8 ounces of water or your favorite beverage. Do not exceed the recommended dose.
CAUTION: Pregnant, nursing mothers, children under 18 and individuals with a known medical condition should consult a physician before using this or any dietary supplement. Please use caution if you have allergies or sensitivities to any of the listed ingredients. Keep out of reach of children and pets. Do not use if safety seal is damaged or missing. Store in a cool dry place. Use this product as a food supplement only. Do not use for weight reduction.
Sustainability
Learn more on what Codeage is doing for the environment and how to help us recycle.
Adults mix 1 scoop daily, or as recommended by your healthcare practitioner, with8 ounces of water or your favorite beverage. Do not exceed the recommended dose.
SEE CAUTION
CAUTION: Pregnant, nursing mothers, children under 18 and individuals with a known medical condition should consult a physician before using this or any dietary supplement. Please use caution if you have allergies or sensitivities to any of the listed ingredients. Keep out of reach of children and pets. Do not use if safety seal is damaged or missing. Store in a cool dry place. Use this product as a food supplement only. Do not use for weight reduction.
ADDITIONAL DETAILS.
9 Essential Amino Acids With Liposomal Delivery BCAA & EAA Supplement
SUSTAINABILITY.
Learn more on what Codeage is doing for the environment and how to help us recycle.
`); $userChatTemplate.addClass('sending'); $messageContainer.append($userChatTemplate); scrollBottom($messageContainer); $.ajax({ type: 'POST', url: url, data: data, success: function (response) { let adminResponse = { role: 'assistant', content: response, }; chatMessageList.push(adminResponse); let $adminResponseTemplate = $(`
${response}
`); $messageContainer.append($adminResponseTemplate); $userChatTemplate.removeClass('sending'); scrollBottom($messageContainer); }, error: function (err) { console.log(err); let errText = err.responseText; $errorContainer.text(errText); $errorContainer.show(); $userChatTemplate.addClass('error'); }, complete: function(){ //re-enable submit button $submit.prop('disabled', false); $userChatTemplate.find('.sending-text-notification').remove(); } }); } function scrollBottom($element) { var h = $element.get(0).scrollHeight; $element.animate({scrollTop: h}); } $('form.assistant-chat-form-container').submit(function(e){ e.preventDefault(); let $this = $(this); let $input = $this.find('.js-assistant-chat-input'); let message = $input.val(); $input.val(''); submitMessage(message, $this); }); $('.js-assistant-chat-suggestion-item').click(function(e){ let message = $(this).text(); let $form = $(this).parents('form.assistant-chat-form-container'); submitMessage(message, $form); }) //end chat assistant script /* is in viewport function for template 6 background-change */ const imageTextMobile = document.querySelector("#template-6-image-text-wrapper--mobile .product-template-6-image-text-item-container.secondary-background"); const imageTextDesktop = document.querySelector("#template-6-image-text-wrapper--desktop .product-template-6-image-text-item-container.secondary-background"); function callback(entries, observer) { entries.forEach((entry) => { let $parents = $('.product-template-6-image-text-container') if(entry.isIntersecting) { $parents.addClass('secondary-background--active') } else { $parents.removeClass('secondary-background--active') } }); } function createObserver(target, callback) { const options = { root: null, threshold: 0.5 }; const observer = new IntersectionObserver(callback, options); observer.observe(target); } if(imageTextDesktop) createObserver(imageTextDesktop, callback); if(imageTextMobile) createObserver(imageTextMobile, callback); /* end is in viewport function for template 6 background-change */ /* RECHARGE EVENT LISTENERS */ let initRechargeWidget = false; window.addEventListener('ReChargeWidget-loaded', () => { //disable subscription if customer is wholesale //end disable subscription //disable subscription if country is not united states because subscription is not available outisde US if(window.theme.country != "US") return false; const config = { productId: 7003207925865, // Required injectionParent: 'form[action*="cart/add"]', // The node that will have the widget injected in injectionMethod: 'prepend', // How will the widget be injected selectors: { price: ['[data-subscription-price]'], // the selectors that will be updated based on subscription !! IMPORTANT THIS IS JUST A DUMMY SELECTOR } }; if(!initRechargeWidget){ window.ReChargeWidget.createWidget(config); initRechargeWidget = true; } $('input[name="rc-custom-radio-group"]').change(function(){ console.log($(this)); let $wrapper = $(this).parents('.rc-custom-widget-container'); let $subscribe_parent = $wrapper.find('.rc-custom-widget-subscribe-container'); let $sellingPlanInput = $wrapper.find('#rc-custom-widget-selling-plan') if($(this).hasClass('rc-custom-widget-subscribe-input')){ $subscribe_parent.addClass('active'); $sellingPlanInput.prop('disabled', false); }else{ $subscribe_parent.removeClass('active'); $sellingPlanInput.prop('disabled', true); } $(document).trigger("atfchange"); }) /* $('#rc-custom-widget-subscribe-input').click(function(){ let $parent = $(this).parents('.rc-custom-widget-subscribe-container'); let $sellingPlanInput = $("#rc-custom-widget-selling-plan"); if($(this).is(':checked')){ $parent.addClass('active'); $sellingPlanInput.prop('disabled', false); }else{ $parent.removeClass('active'); $sellingPlanInput.prop('disabled', true); } $(document).trigger("atfchange"); }) */ window.ReChargeWidget.eventService.addEventListener('widget:build', async (widget) => { var activeVariant = 40530828951657; var { variantSubscriptionData, sellingPlanGroups } = await fetchProductSubscriptionData(); buildRCDelivery(activeVariant, sellingPlanGroups, variantSubscriptionData); changeWidgetLabels(activeVariant, sellingPlanGroups, variantSubscriptionData); //show widget after recharge init; $('.rc-custom-widget-wrapper').show(); $(document).trigger("atfchange"); $(document).on('variantChange', function(variant){ console.log('variantChange: ', variant); activeVariant = variant.variant.id; buildRCDelivery(activeVariant, sellingPlanGroups, variantSubscriptionData); changeWidgetLabels(activeVariant, sellingPlanGroups, variantSubscriptionData); }) }); window.ReChargeWidget.eventService.addEventListener('widget:sellingPlans:change', function(a,b,c){ console.log('a', a); }); }); //product info modal script $('.js-product-info-modal-open').click(function(e){ e.preventDefault(); let tab = $(this).data('tab'); let $modal = $('.product-details-modal-wrapper'); if($modal.length == 0) return; let $activeTab = $modal.find(`[data-tab="${tab}"]`); $modal.find('.product-modal-content').removeClass('active'); $activeTab.addClass('active'); $('html').addClass('modal--open'); $modal.addClass('open'); setTimeout(function(){ $modal.addClass('bg-active'); $modal.find('.product-details-modal-container').addClass('active'); //click outside of product details modal $(document).on("click.product-details-modal", function (event) { let $modal = $('.product-details-modal-wrapper'); if ($modal.hasClass("open") && !$(event.target).closest(".product-details-modal-container").length) { closeProductDetailsModal(); } }); }, 100) }) $('.js-product-details-modal-close').click(function(e){ e.preventDefault(); closeProductDetailsModal(); }) function closeProductDetailsModal(){ let $modal = $('.product-details-modal-wrapper'); $modal.removeClass('bg-active'); $modal.find('.product-details-modal-container').removeClass('active'); setTimeout(function(){ $modal.removeClass('open'); $('html').removeClass('modal--open'); $(document).off('.product-details-modal') }, 300) } function changeWidgetLabels(activeVariant, sellingPlanGroups, variantSubscriptionData){ let variant = variantSubscriptionData[activeVariant] let planGroupId = variant.selling_group_id; let planData = sellingPlanGroups[planGroupId]; let $discount = $('[data-discount-text]'); let $subSaveAmount = $('[data-price-subsave-amount]'); let $subscriptionPrice = $('[data-subscribe-price]'); let discountText = ''; if(planData[0].price_adjustments_value_type == "percentage"){ discountText = `${planData[0].price_adjustments_value}%` } $discount.text(discountText); let subSave = 0; subSave = parseFloat(variant.unit_price) - parseFloat(variant.discounted_price); //$subscriptionPrice.text(variant.discounted_price); $subscriptionPrice.html(slate.Currency.formatMoney(variant.discounted_price, theme.moneyFormat)) if(!isNaN(subSave)) { $subSaveAmount.html(slate.Currency.formatMoney(subSave.toFixed(2), theme.moneyFormat)) //$subSaveAmount.text('$' + subSave.toFixed(2)); } } function buildRCDelivery(activeVariant, sellingPlanGroups, variantSubscriptionData){ let planGroupId = variantSubscriptionData[activeVariant].selling_group_id; let planData = sellingPlanGroups[planGroupId]; let $template = $(`
Delivery:${planData[0].selling_plan_name}
`); for(let i = 0; i < planData.length; i++){ let $item = $(``); $template.append($item); } //remove previous dropdown if any $('.rc-custom-widget-subscribe-container .js-delivery-dropdown .custom-dropdown-container').remove(); $('.rc-custom-widget-subscribe-container .js-delivery-dropdown').append($template); } async function fetchProductSubscriptionData(){ let variantSubscriptionData = {}; let sellingPlanGroups = {}; let productSubscriptionData = await window.ReChargeWidget.api.fetchProduct(7003207925865); console.log('productSubscriptionData: ', productSubscriptionData); let groups = productSubscriptionData.selling_plan_groups; let variants = productSubscriptionData.variants; for(let i = 0; i < groups.length; i++){ sellingPlanGroups[groups[i].selling_plan_group_id] = groups[i].selling_plans; } for(let i = 0; i < variants.length; i++){ variantSubscriptionData[variants[i].id] = { selling_group_id: variants[i].selling_plan_allocations[0].selling_plan_group_id, unit_price: variants[i].prices.unit_price, discounted_price: variants[i].prices.discounted_price, compare_at_price: variants[i].prices.compare_at_price }; } console.log('variantsub: ', variantSubscriptionData); console.log('plangroups:' ,sellingPlanGroups); return {variantSubscriptionData, sellingPlanGroups}; } $('.js-product-buy-now-links-toggle').click(function (e) { e.preventDefault(); let parent = $(this).parent('.product-buy-now-links-container'); let wrapper = $(this).parents('.product-buy-now-wrapper'); if (!parent.hasClass('open')) { window.addEventListener('click', handleClickOutsideBuyNowLinks); } else { window.removeEventListener('click', handleClickOutsideBuyNowLinks); } parent.toggleClass('open'); wrapper.toggleClass('menu-open'); }); $('.js-product-buy-now-link--anchor').click(function(e){ e.stopPropagation(); closeBuyNowLinks(); if($(this).hasClass('js-product-buy-now-link--mobile-tab')){ e.preventDefault(); let target = $(this).data('target'); let parent_selector = `.mobile-product-tabs ${target}`; let tab_trigger = $(parent_selector).find('h3'); console.log('tab: ', tab_trigger) $('html, body').animate({ scrollTop: $(parent_selector).offset().top - 200 }, 400, function(){ if(!$(parent_selector).hasClass('open')){ $(tab_trigger).trigger('click'); } }); } }) function handleClickOutsideBuyNowLinks(e) { if ( !$(e.target).is('.product-buy-now-links-container *') && $('.product-buy-now-links-container').hasClass('open') ) { closeBuyNowLinks(); } } function closeBuyNowLinks() { $('.product-buy-now-links-container').removeClass('open'); $('.product-buy-now-wrapper').removeClass('menu-open'); } $('.js-header-icon-listen').click(function(e){ e.preventDefault(); let target = $(this).data('target'); let audioPlayer = document.querySelector(target); audioPlayer.classList.add("audio-player-open"); audioPlayer.play(); $(this).addClass('audio-player-open'); }) function scrollProductModules(){ let $container = $('.template-product-wrapper'); let $photoSection = $('.product-photo-section'); let $photoContainer = $photoSection.find('.product-photo-flex-wrapper'); let $formSection = $('#product-details-wrapper .form__wrapper') let tallLayout = $container.data('tall-layout'); let fixedPhotoSection = $container.data('sticky-photo'); let photoHeight = $photoSection.outerHeight(); let detailsHeight = $formSection.outerHeight(); if(tallLayout){ if(photoHeight > detailsHeight){ $formSection.scrollToFixed({ marginTop: 80, limit: function(){ let photoHeight = $('.product-photo-section').outerHeight(); let detailsHeight = $('#product-details-wrapper .form__wrapper').outerHeight(); let limit = photoHeight - detailsHeight ; let $fullScreenVideo = $('.product-video-header-fullscreen-wrapper'); if($fullScreenVideo.length > 0){ limit = limit + $fullScreenVideo.outerHeight(); } if(limit <= 0){ limit = 1; } return limit; }, minWidth: 768, zIndex: 1, removeOffsets: false }) } }else{ if(!fixedPhotoSection) return; if($container.hasClass('custom_template_6')){ $photoContainer.scrollToFixed({ marginTop: 80, limit: function(){ let photoSectionHeight = $('.product-photo-flex-wrapper').outerHeight(); let limit = $("#product-details-wrapper").outerHeight() - photoSectionHeight + 20; //+ 20 for the margins let $fullScreenVideo = $('.product-video-header-fullscreen-wrapper'); if($fullScreenVideo.length > 0){ limit = limit + $fullScreenVideo.outerHeight(); }else{ limit = limit + $('.product-container #breadcrumbs').outerHeight(); } if(limit <= 0){ limit = 1; } return limit; }, minWidth: 768, zIndex: 1, removeOffsets: false }) }else{ $photoSection.scrollToFixed({ marginTop: 80, limit: function(){ let photoSectionHeight = $('.product-photo-section-container').outerHeight(); let limit = $("#product-details-wrapper").outerHeight() - photoSectionHeight; let $fullScreenVideo = $('.product-video-header-fullscreen-wrapper'); if($fullScreenVideo.length > 0){ limit = limit + $fullScreenVideo.outerHeight(); } if(limit <= 0){ limit = 1; } return limit; }, minWidth: 768, zIndex: 1, removeOffsets: false }) } } } function initRelatedInfoSection(){ var $parent = $('.js-related-information-section'); var productHandle = $parent.data('product-handle') $.ajax({ url: window.Shopify.routes.root + 'search?view=blog-ajax&type=article&q=product:' + productHandle, dataType: 'json', success: function(data){ console.log(data); buildRelatedInfoSection(data, $parent); }, error: function(err){ console.log(err) } }) } function initRelatedVideos(){ var $parent = $('.js-related-videos-section'); var productHandle = $parent.data('product-handle'); let collectionVideo = $parent.data('collection'); let searchQuery = 'product-video:' + productHandle; if(collectionVideo && collectionVideo != ''){ searchQuery += ' OR collection:' + collectionVideo } $.ajax({ url: window.Shopify.routes.root + 'search?view=videoBlog-ajax&type=article&q=' + searchQuery, dataType: 'json', success: function(data){ console.log(data); buildRelatedVideosSection(data, $parent); buildRelatedVideosPopup(data); }, error: function(err){ console.log(err) } }) } function buildRelatedVideosPopup(){ let $el = $('#product-related-video-player-popup'); var video = $(` `) //append video el $el.find('.product-related-video-player-object').prepend(video); //append playlist el let isMobile = $(window).width() > 768 ? false : true; if(!isMobile){ $el.find('.product-related-video-player-container').append(``); }else{ $el.find('.product-related-video-playlist-mobile').append(``); } var vidOpts = { controls: true, preload: "auto", autoPlay: true, playsinline: true, controlBar: { volumePanel: { inline: true }, }, fill: true, aspectRatio: '16:9' }; videojs("product-related-video-player", vidOpts, function () {}); var player = videojs("product-related-video-player"); var playlist = []; var video_index = 0; //get playlist if(!relatedVideosArr || relatedVideosArr.length == 0) return false; for(let i = 0; i < relatedVideosArr.length; i++){ let item = relatedVideosArr[i]; var video = item.video var thumb = item.thumb var category = item.category var title = item.title var video_type = item.videoType var data = { name: title, description: category, video_type: video_type, autoplay: true, sources: [ { src: video, type: 'video/mp4'} ], aspectRatio: "16:9", thumbnail:[ { src: thumb } ] } playlist.push(data); } player.playlist(playlist, video_index); player.playlist.autoadvance(5); player.playlistUi({ title: `VIDEOS FOR THIS PRODUCT.`, title2: `VIDEOS FOR RELATED PRODUCTS.`, mobileTitle: `RELATED VIDEOS.`, isMobile: isMobile }); let draggableElement = document.getElementById('product-related-video-player-draggable-el') let parentElement = document.getElementById('product-related-video-player-popup'); interact(draggableElement) .draggable({ startAxis: 'y', lockAxis: 'y', inertia: true, listeners: { move: dragMoveListener }, modifiers: [ interact.modifiers.snap({ targets: [ { x: 0, y: 700, range: 100 }, { x: 0, y: 1, range: 100 } ], }) ] }) function dragMoveListener (event) { var target = event.target // keep the dragged position in the data-x/data-y attributes //get default height based on 10% of element let targetHeight = interact.getElementRect(event.target).height * -1; //var yDefault = targetHeight * 0.9; //starting height of video tab var yDefault = -190; var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx var y = (parseFloat(target.getAttribute('data-y')) || yDefault) + event.dy if(y < targetHeight){ y = targetHeight; }else if(y > yDefault) { y = yDefault } // translate the element target.style.transform = 'translate(' + x + 'px, ' + y + 'px)' // update the posiion attributes target.setAttribute('data-x', x) target.setAttribute('data-y', y) } } function buildRelatedVideosSection(data, $wrapper){ var items = data.results; if(!items || items.length == 0){ return; } let priorityItems = []; let itemsCopy = []; //split array to priority and non priority for(let i = 0; i < items.length; i++){ if(items[i].priority){ priorityItems.push(items[i]); }else{ itemsCopy.push(items[i]); } if(items[i].watch){ initProductWatchIcon(items[i]); } } //sort by date itemsCopy.sort(function(a,b){ // Turn your strings into dates, and then subtract them // to get a value that is either negative, positive, or zero. return new Date(b.published_at) - new Date(a.published_at); }); //sort by date; priorityItems.sort(function(a,b){ return new Date(b.published_at) - new Date(a.published_at); }); //merge two arrays priority first items = [...priorityItems, ...itemsCopy]; console.log('related videos: ', items); var $relatedVideosSliderContainer = $wrapper.find('.product-related-videos-slider'); //add articles to the slider for(var i = 0; i < items.length; i++){ var article = items[i]; var template = $(`
${article.category}${article.title}
`) $relatedVideosSliderContainer.append(template); relatedVideosArr.push(article); } $relatedVideosSliderContainer.slick({ accessibility: true, slidesToShow: 4, infinite: true, slidesToScroll: 1, prevArrow: '', nextArrow: '', arrows: true, responsive: [ { breakpoint: 768, settings: "unslick" } ] }) $wrapper.show(); } //initializes the watch link in the product page function initProductWatchIcon(item){ let video = item.video; let header_video_icon = $('.js-header-icon-watch'); header_video_icon.data('video', video); header_video_icon.addClass('open'); } function buildRelatedInfoSection(data, $wrapper){ var items = data.results; if(!items || items.length == 0){ return; } let priorityItems = []; let itemsCopy = []; //split array to priority and non priority for(let i = 0; i < items.length; i++){ if(items[i].priority){ priorityItems.push(items[i]); }else{ itemsCopy.push(items[i]); } } //sort by date itemsCopy.sort(function(a,b){ // Turn your strings into dates, and then subtract them // to get a value that is either negative, positive, or zero. return new Date(b.published_at) - new Date(a.published_at); }); //sort by date; priorityItems.sort(function(a,b){ return new Date(b.published_at) - new Date(a.published_at); }); //merge two arrays priority first items = [...priorityItems, ...itemsCopy]; var $relatedInfoSliderContainer = $wrapper.find('.product-related-information-slider'); //add articles to the slider for(var i = 0; i < items.length; i++){ console.log('going here') var article = items[i]; var template = $(`
${article.category}${article.title}
`) $relatedInfoSliderContainer.append(template); } $relatedInfoSliderContainer.slick({ accessibility: true, slidesToShow: 4, infinite: true, slidesToScroll: 1, prevArrow: '', nextArrow: '', arrows: true, responsive: [ { breakpoint: 768, settings: "unslick" } ] }) $wrapper.show(); } function showAdditionalSurveyContainer(){ $additionalSurveysContainer = $('.additional-surveys-container'); $additionalSurveysContainer.parents('.product-template-section').show(); } function getProductAdditionalDetails(product_id, accentColor){ console.log('asdasd'); var $wrapper = $('.product-additional-details-wrapper'); var $primaryIconsWrapper = $('.product-photo-footer-icons-wrapper') function getSuccess(data){ console.log('asdas222d'); var $listContainer = $('.js-product-additional-details-list'); var $primaryIconsListContainer = $('.js-product-primary-icons'); //variables for top seller widget var $topSellerWidget = $('.js-top-seller-icon-container'); var $topSellerWidgetRank = $topSellerWidget.find('.js-top-seller-rank'); if(data.icons && data.icons.length > 0){ let template = ``; data.icons.map(function(icon){ template += `
` $primaryIconsListContainer.append(template); }); }else{ $primaryIconsWrapper.hide(); } //top seller widget var monthlyRank = data.metadata.monthlyRank; if(monthlyRank && monthlyRank <= 10){ $topSellerWidgetRank.text(monthlyRank); $topSellerWidget.css('display', 'flex'); //show best seller productpage badge let $productLabelContainer = $('.product-page-badge-label-best-seller-container'); $productLabelContainer.find('.js-top-seller-rank').text(monthlyRank); $('.js-product-best-selling-badge').show(); } /* //init new and returning customers const $additionalSurveysContainer = $('.additional-surveys-container'); const newReturningThreshold = 0.3; let repeatedOrders = data.metadata.totalOrders - data.metadata.firstTimeOrders; let totalOrders = data.metadata.totalOrders let repeatOrderPercentage = repeatedOrders / totalOrders; var newReturningData = { totalOrders: totalOrders, firstTimeOrders: data.metadata.firstTimeOrders, repeatedOrders: repeatedOrders } if(repeatOrderPercentage > newReturningThreshold){ console.log('asdasdasdas: ', accentColor) buildNewReturningCustomersWidget($additionalSurveysContainer, newReturningData, accentColor); showAdditionalSurveyContainer(); } */ } function errorCallback(){ } ProductMetaData.get(product_id, getSuccess, errorCallback); } //show rest of bullet points on click $('.js-product-bullet-points-see-more').click(function(e){ e.preventDefault(); $('.product-bullet-points-container').addClass('show'); $(this).hide(); }) $('.js-product-bullet-points-see-more-template-3').click(function(e){ e.preventDefault(); $('.product__description_container').show(); $(this).hide(); }) $('.js-product-bullet-points-see-more-template-4').click(function(e){ e.preventDefault(); $('.product-bullet-points-container').addClass('show'); $(this).hide(); }) function init(){ initCodectiblesSlider(); initRelatedInfoSection(); initRelatedVideos(); scrollProductModules(); let accentColor = ''; accentColor = "#DA4A50"; getProductAdditionalDetails("7003207925865", accentColor); //count product bullet points. If greater than 2 show see more if($('.product-bullet-points-container ul li').length > 2){ $('.js-product-bullet-points-see-more').show(); } Chart.register(ChartDataLabels); let activeSurveyId = "guthealth-qmc-1-14-22" let activeSurveyType = "qmc" let customer_id = ""; let isLocked = false; initProductWidgets(7003207925865, customer_id, activeSurveyId, activeSurveyType, isLocked, accentColor); } function initProductWidgets(product_id, customer_id, activeSurveyId, activeSurveyType, isLocked, accentColor){ ProductMetaData.getAssociatedSurveys(product_id, getSuccess, errCb); $additionalSurveysContainer = $('.additional-surveys-container'); $mainSurveyContainer = $('#product-main-widget-wrapper'); function getSuccess(data){ //check if active survey is in the data if(activeSurveyId != "" && activeSurveyId !== null && activeSurveyId != "FALSE"){ let activeSurveyIsFound = false; for(let i = 0; i < data.length; i++){ if(data[i].id == activeSurveyId){ //move the active survey to the 1st spot if it's not in the first spot if(i > 0){ const activeSurveyData = data.splice(i, 1); data.unshift(activeSurveyData[0]); } activeSurveyIsFound = true; break; } } if(!activeSurveyIsFound){ data = [ { id: activeSurveyId, type: activeSurveyType }, ...data ] } }else{ //hide main survey container if active survey is blank $mainSurveyContainer.hide(); } //determine if insights & quiz will be shown let hasSurvey = false; for(let i = 0; i < data.length; i++){ const type = data[i].type; const id = data[i].id; //let answerAlreadySubmitted = checkFormSubmitted(id); let $wrapper = $additionalSurveysContainer; answerAlreadySubmitted = false; if(id == activeSurveyId){ //$wrapper = $mainSurveyContainer; //unlock product if locked if(answerAlreadySubmitted){ unlockProductPage(); } }else{ //set locked to false if not main widget isLocked = false; } if(!hasSurvey){ if(type == "qmc"){ hasSurvey = true; }else if(!answerAlreadySubmitted && type == "quiz_qmc"){ hasSurvey = true; } } switch(type){ case "qmc": initQMCWidget(id, answerAlreadySubmitted, isLocked, product_id, customer_id, accentColor, $wrapper); break; case "quiz_qmc": if(!answerAlreadySubmitted){ initQMCQuizWidget(id, answerAlreadySubmitted, isLocked, product_id, customer_id, accentColor, $wrapper); } break; } } if(hasSurvey){ showAdditionalSurveyContainer(); } } function errCb(){ //hide survey containers on error $mainSurveyContainer.hide(); } //check if form has been filled out within 7 days function checkFormSubmitted(id){ if(Cookies.check(id)){ return true; } return false; } function unlockProductPage(){ if($('.product-custom-wrapper').hasClass('product-page-is-locked')){ theme.Product.prototype.productUnlock(); } } } function initQMCWidget(id, answerAlreadySubmitted, isLocked, product_id, customer_id, accentColor, $wrapper){ ProductMetaData.getQMCTally(id, getSuccess, errorCallback); function getSuccess(data){ buildQMCWidget($wrapper, data, answerAlreadySubmitted, isLocked, product_id, customer_id, accentColor); } function errorCallback(){ console.log('error cb'); } } function buildQMCWidget($wrapper, data, answerAlreadySubmitted, isLocked, product_id, customer_id, accentColor){ const id = data.id let buttonText = "Vote" if(isLocked){ buttonText = "Vote & Unlock" } let widgetContainerClasses = "" if(answerAlreadySubmitted){ widgetContainerClasses += " form-disabled" } var $widgetContainerTemplate = $(`
${data.description}
Please select an answer
Based on respondents answers.
`); $wrapper.append($widgetContainerTemplate); let $choicesWrapper = $wrapper.find('.'+ id +'-choices-wrapper'); let maximumPercent = Math.ceil(data.maximum / data.totalCount * 100); let surveyTally = data.result; let counter = 5; for(key in surveyTally){ const value = surveyTally[key]; const chartId = `${id}-qmc-chart-${counter}`; var $choicesTemplate = $(`
${key}
${key}
`); $choicesWrapper.append($choicesTemplate); if(value > 0){ let count = surveyTally[key]; count = calculatePercentage(count, data.totalCount); $('.qmc-chart--' + chartId).each(function(index,element) { const ctx = element.getContext('2d'); var background_1 = accentColor if(accentColor == "" || accentColor == false){ background_1 = ctx.createLinearGradient(0, 0, 400, 0); background_1.addColorStop(0, '#E6C699'); background_1.addColorStop(1, '#85653D'); } const chart = new Chart(ctx, generateConfigForQMCWidget(count, value, maximumPercent+5, background_1)); chartArr[key] = chartId; }) }else{ $choicesTemplate.find('.product-widget-qmc-chart-container').hide(); $choicesTemplate.addClass('no-result'); } counter++; } //trigger product form resize $(document).trigger('product-form-resize'); } //update chart after voting $(document).on('QMC_VOTE_SUCCESS', function(event,data){ console.log('qmc-success', data); console.log(chartArr); console.log(data); for(key in chartArr){ if(key in data.result){ let chartId = chartArr[key]; let chart = Chart.getChart(chartId); let count = data.result[key]; let percentageCount = calculatePercentage(count, data.totalCount); console.log('chartid', chartId); console.log('chart', chart); console.log('count', percentageCount); chart.data.datasets[0].data[0] = percentageCount chart.update('none'); console.log('chart new', chart); } } }); function initQMCQuizWidget(id, answerAlreadySubmitted, isLocked, product_id, customer_id, accentColor, $wrapper){ ProductMetaData.getQMCTally(id, getSuccess, errorCallback); function getSuccess(data){ buildQMCQuizWidget($wrapper, data, answerAlreadySubmitted, isLocked, product_id, customer_id); } function errorCallback(){ console.log('error cb'); } } function buildQMCQuizWidget($wrapper, data, answerAlreadySubmitted, isLocked, product_id, customer_id){ const id = data.id let buttonText = "Submit" let gold_icon = "//www.codeage.com/cdn/shop/files/Codeage_Quiz_Gold.png?v=1773238444056017230"; if(isLocked){ buttonText = "Answer & Unlock" } const $widgetContainer = $(`
Quiz
${data.description}
Please select an answer
This is correct, well done!
of respondents get the correct answer.
`) let $choicesContainer = $widgetContainer.find('.'+ id +'-qmc-choices-wrapper'); let $dataContainer = $widgetContainer.find('.product-widget-quiz-qmc-wrapper--' + id) //$wrapper.append($widgetContainer); let surveyTally = data.values; //append correct answer to wrapper $dataContainer.data('answer', data.correctAnswer); //calculate percentage of correct answer $dataContainer.data('totalCorrect', data.totalCorrectAnswer); $dataContainer.data('totalCount', data.totalCount); for(key in surveyTally){ var $quiz_qmc_template = $(`
${surveyTally[key]}
`); $choicesContainer.append($quiz_qmc_template); } $wrapper.append($widgetContainer); //trigger product form resize delay for 1 second to ensure that chart is already loaded setTimeout(function(){ $(document).trigger('product-form-resize'); }, 1000); } function buildNewReturningCustomersWidget($wrapper, data, accentColor){ /* data declaration { totalOrders firstTimeOrders repeatedOrders } */ const $widgetContainerTemplate = $(`
Returning vs. new customers
`) $wrapper.prepend($widgetContainerTemplate); $('.newreturncustomers-canvas-widget').each(function(index,element){ $(element).hide(); const ctx = element.getContext('2d'); new Chart(ctx, getConfigForNewReturnCustomers([data.repeatedOrders, data.firstTimeOrders], data.totalOrders, accentColor)); setTimeout(function(){ $(element).show(); }, 2000) }) } function escapeHtml (string) { var entityMap = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '/': '/', '`': '`', '=': '=' }; return String(string).replace(/[&<>"'`=/]/g, function (s) { return entityMap[s]; }); } function calculatePercentage(value, total){ count = value / total * 100; count = count.toFixed(1); return count; } function generateConfigForQMCWidget(data, text, max, gradientBackground){ const borderRadius = 5; const borderRadiusAllCorners = {topLeft: borderRadius, topRight: borderRadius, bottomLeft: borderRadius, bottomRight: borderRadius} const labels = ['New Customers']; return { type: 'bar', data: { labels: labels, datasets: [{ axis: 'y', label: text, data: [data], fill: false, borderWidth: 0, borderRadius: {topLeft: borderRadius, topRight: borderRadius, bottomLeft: borderRadius, bottomRight: borderRadius}, borderSkipped: false, backgroundColor: gradientBackground, }] }, options: { events: [], indexAxis: 'y', // Elements options apply to all of the options unless overridden in a dataset // In this case, we are setting the border of each horizontal bar to be 2px wide elements: { bar: { borderWidth: 0, borderRadius: { bottomLeft: 5, bottomRight: 5, topLeft: 5, topRight: 5 }, backgroundColor: "#4082fb", hoverBackgroundColor:"#4082fb", } }, scales: { y: { display: false, beginAtZero: true, title: { display: false, }, grid: { display: false, drawBorder: false, } }, x: { display: false, suggestedMax: max } }, responsive: true, plugins: { tooltip: { enabled: false }, legend: { display: false, }, title: { display: false, text: text, align: "start", padding: { bottom: 0 }, font: { family: "calibre-web-regular", size: "16", color: "#545454", weight: "400" } }, subtitle: { display:false, text: text }, datalabels: { clamp: true, align: 'start', anchor: 'start', labels: { value: { color: 'black', align: 'end', anchor: 'end', font: { size: 12, weight: 'bold' }, formatter: function(value, context) { return value + '%'; }, } } } } }, }; } //get chart option for new and returning customers function getConfigForNewReturnCustomers(data, totalOrders, accentColor) { var dataLabelColor = ['#000000', '#000000']; // check if accent color is dark or light if(ThemeUtils.isDarkColor(accentColor)){ //change label to white if accent color is too dark dataLabelColor[0] = '#ffffff'; } return { type: 'pie', data: { labels: ['Returning Customers', 'New Customers'], datasets: [ { label: 'Total Orders', data: data, fill: false, borderWidth: 0, backgroundColor: [accentColor, '#d8d8d8'], }, ], }, options: { responsive: true, plugins: { tooltip: { enabled: false, }, legend: { position: 'bottom', labels: { padding: 10, font: { family: 'Calibre', size: 15 } }, }, datalabels: { clamp: true, align: 'start', anchor: 'start', color: dataLabelColor, labels: { value: { align: 'center', anchor: 'center', offset: 5, font: { family: 'Calibre', size: 18, weight: 500, }, formatter: function (value, context) { let percent = (value / totalOrders) * 100 return percent.toFixed(2) + '%' }, }, }, }, }, }, } } init(); }); function closeAllAudioPlayer(){ $('.audio-player-open').each(function(){ //stop all audio player if($(this).hasClass('js-header-icon-listen')){ let target = $(this).data('target'); let audioPlayer = document.querySelector(target); audioPlayer.pause(); } $(this).removeClass('audio-player-open'); }) }
Address: Suite 228 919 Deana Ford, Lake Meridithberg, NE 60017-4257
Phone: +2613987384138
Job: Chief Retail Officer
Hobby: Tai chi, Dowsing, Poi, Letterboxing, Watching movies, Video gaming, Singing
Introduction: My name is Zonia Mosciski DO, I am a enchanting, joyous, lovely, successful, hilarious, tender, outstanding person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.