Gluten-Free Lemon Raspberry Triple Bundtlet Tower (2024)

In stock

'); $(".sentiment_flag-" + i).click(function() { $(".sentiment_flag-content-" + i).toggle(); $(this).html($(this).html() == 'Hide Disclaimer' ? '* See Disclaimer' : 'Hide Disclaimer'); }); } if (elem.is_dependent) { if (elem.dependent_items != null) { var option_dependent_list = elem.dependent_items.toString().split(","); field_container = "bundle-option-group-" + i; $.each(option_dependent_list, function(key, value) { parentId = value.split("-"); $("." + field_container).addClass("option-parent-" + value) $("." + field_container).addClass("dependent"); $("." + field_container).addClass("parent-bundle-group-" + parentId[0]); $("input#bundle-option-" + value).addClass("parent-option"); $("." + field_container + " input[type=radio]").addClass('child'); $("input.parent-option#bundle-option-" + value).closest("div.option").addClass('parent-section'); }); option_data = elem.dependent_items.toString().split("-"); } } if (elem.is_dependent == '0') { let itemKey = []; $.each(elem.items, function(k, v) { itemKey.push(i + '-' + k) }) OptionRelation[i] = itemKey; } }); $('.select-options.assortment_dropdown select').on('change', function() { var selected_text = $(this).find("option:selected").text(); var selected_option_id = ''; selected_option_id = $(this).attr('id'); selected_option_value = $(this).val(); var match_option = selected_option_id.replace("bundle-option-", "") + '-' + selected_option_value; parentGroupId = match_option.split("-"); enableDisableDependentOptions(parentGroupId, match_option); let dependantSelector = ".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option; $(".dependent.parent-bundle-group-" + parentGroupId[0] + " #checkbox_max_qty").val(0); if($(dependantSelector).css('display') == 'block') { let maxQty = $(dependantSelector).data('maxqty'); $(dependantSelector + " #checkbox_max_qty").val(maxQty); } else { $("#product-addtocart-button-top").removeAttr("disabled"); $("#product-updatecart-button-top").removeAttr("disabled"); } }); $($("div.parent-section input[type='radio']").change(function() { if ($(this).is(':checked')) { var selected_option_id = ''; selected_option_id = $(this).attr('id'); var match_option = selected_option_id.replace("bundle-option-", ""); parentGroupId = match_option.split("-"); var parent_match = '.option-parent-' + match_option; enableDisableDependentOptions(parentGroupId, match_option); } })); }.bind(this)) let needDefaultCheckedOptionGroup = []; $.each([...new Set(needHideoptionKey)], function(k, v) { needDefaultCheckedOptionGroup.push(OptionRelation[v]) }); needHideoptionValue = [...new Set(needHideoptionValue)] $.each(needDefaultCheckedOptionGroup, function(a_k, a_v) { $.each(a_v, function(b_v, b_val) { if (!needHideoptionValue.includes(b_val)) { $('#bundle-option-' + b_val).click(); } else { $('#bundle-option-' + b_val).parent('.choice ').hide(); } }) if (a_v.length == needHideoptionValue.length) { setOutOfStock(); } }) function setOutOfStock() { $('.box-tocart .qty').hide(); $('.price-container').hide(); $('#product-addtocart-button-top').html('Out Of Stock'); $('#product-addtocart-button-top').attr('id', 'product-addtocart-button-top-disabled'); disableAddToCart = true; } $('input[type=checkbox]:disabled.bundle-product-option').each(function(idx, item) { $(item).parent().parent().hide(); }); $('input[type=radio]:disabled.bundle-product-option').each(function(idx, item) { $(item).parent().hide(); }); $('.opt-col-one select.multiselect option:disabled').each(function(idx, item) { $(item).hide(); }); $('select.bundle-product-option option:disabled').each(function(idx, item) { $(item).hide(); }); function enableDisableDependentOptions(parentGroupId,match_option) { if ($('div').hasClass("dependent")) { $(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option).css('display', 'block'); $(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option).removeClass('hidden-child-option'); $(".dependent.parent-bundle-group-" + parentGroupId[0]).not(".option-parent-" + match_option).css('display', 'none'); $(".dependent.parent-bundle-group-" + parentGroupId[0]).not(".option-parent-" + match_option).addClass('hidden-child-option'); $(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option).addClass('default_val'); $(".dependent.parent-bundle-group-" + parentGroupId[0]).not(".option-parent-" + match_option).removeClass('default_val'); $(".dependent").not(".option-parent-" + match_option).removeClass('required'); if ($(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option + " .field.choice.disabled input.bundle-product-option").hasClass('default_selected') == true) { $(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option + " .field.choice.disabled input.bundle-product-option").removeClass('default_selected'); if ($(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option + " .field.choice.disabled").nextAll().not('.outofstock').eq(0).find('input.bundle-product-option').attr('type')) { $(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option + " .field.choice.disabled").nextAll().not('.outofstock').eq(0).find('input.bundle-product-option').addClass('default_selected'); } else { $(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option + " .field.choice").not('.outofstock').not('.none').eq(0).find('input.bundle-product-option').addClass('default_selected'); } } if ($(".dependent .nested.options-list input.bundle-product-option:checked").hasClass('default_option') == false) { $(".dependent .nested.options-list input.bundle-product-option:checked").addClass('default_option'); } $(".hidden-child-option input.bundle-product-option").removeAttr('data-validate'); if ($(".option-parent-" + match_option + " input.bundle-product-option").attr('type') == 'radio' || $(".option-parent-" + match_option + " input.bundle-product-option").attr('type') == 'checkbox') { $(".hidden-child-option.parent-bundle-group-" + parentGroupId[0] + " input.bundle-product-option.radio").attr("checked", false); $(".hidden-child-option.parent-bundle-group-" + parentGroupId[0] + " input.radio-none").click(); $(".option-parent-" + match_option + " input.radio.bundle-product-option:not('.optional-option-input')").attr('data-validate', "{'required-entry':true}"); $(".option-parent-" + match_option + " input.bundle-option-select.bundle-product-option:not('.optional-option-input')").attr('data-validate', "{'required-entry':true}"); $('.hidden-child-option input.bundle-product-option:checked').each(function(index, elem) { $("#" + elem.id).click(); if ($("#" + elem.id).attr('data-product-type') != 'opt-col-one std-assort') { $("#" + elem.id + "-qty-input").val('0'); } if ($(".plus").prop('disabled')) { $('.plus').prop("disabled", false); } }); if ($(".option-parent-" + match_option + " input.checkbox").attr('data-product-type') == 'opt-col-one std-assort' && window.IsBakerySession) { $('[data-product-type="opt-col-one std-assort"]').each(function(index, elem) { $("#" + elem.id).click(); $("#product-addtocart-button-top").prop('disabled', false); $("#product-updatecart-button-top").prop('disabled', false); }); } $(".hidden-child-option.parent-bundle-group-" + parentGroupId[0] + " input.bundle-product-option.radio").attr("checked", false); $(".hidden-child-option.parent-bundle-group-" + parentGroupId[0] + " input.radio-none").click(); let defaultOptionDom = ''; defaultOptionDom += ".dependent.parent-bundle-group-" + parentGroupId[0]; defaultOptionDom += ".option-parent-" + match_option; defaultOptionDom += " .nested.options-list input.bundle-product-option"; $(defaultOptionDom + '.default_selected').click(); $(defaultOptionDom + '.default_option').click(); $(".dependent.parent-bundle-group-" + parentGroupId[0] + ".option-parent-" + match_option + " .nested.options-list .field.choice.disabled input.bundle-product-option.default_selected").prop("checked", false); $(".hidden-child-option.parent-bundle-group-" + parentGroupId[0] + " .nested.options-list input.bundle-product-option.default_selected").prop("checked", false); $(".hidden-child-option.parent-bundle-group-" + parentGroupId[0] + " .nested.options-list input.bundle-product-option.default_option").prop("checked", false); $(".hidden-child-option.parent-bundle-group-" + parentGroupId[0] + " input.radio-none").click(); if ($(".option-parent-" + match_option + " input.checkbox").attr('data-product-type') == 'opt-col-one cust-assort') { } } $(".hidden-child-option.dependent input:checked").not(".option-parent-" + match_option).attr("data-product-type", 'opt-col-one extra-frosting').trigger('click'); } } function getPopup() { var options = { type: 'popup', responsive: false, clickableOverlay: false, innerScroll: false, modalClass: 'addtocart-modal', modalCloseBtn: '[data-role="closeBtn"]', buttons: [] }; var popup = modal(options, $('#pdp-modal')); return popup; }; $(".bundle-product-option").on('click', function(e) { let id = $(this).attr('id').split("-"); let optionId = (typeof id[2] === 'undefined') ? 0 : id[2]; let pname = (typeof $(this).attr('pname') === 'undefined') ? "" : $(this).attr('pname'); if (optionId > 0 && pname != "") { if (pname.includes("Gluten")) { $('.sentiment_flag-' + optionId).show(); } else { $('.sentiment_flag-' + optionId).hide(); } } getOosMessage(this); }); function getOptionById(id) { return optionArray.find(option => +option['option_id'] === +id) } function getOosMessage(element) { let id = $(element).attr('id').split("-"); let optionId = (typeof id[2] === 'undefined') ? 0 : id[2]; let pname = (typeof $(element).attr('pname') === 'undefined') ? "" : $(element).attr('pname'); const option = getOptionById(optionId); let toDates = option['to_dates']; let fromDates = option['from_dates']; let is_global = option['is_global']; let items = option['items']; if (toDates[id[3]]) { let oosToDate = new Date(toDates[id[3]]).getTime(); let oosFromDate = new Date(fromDates[id[3]]).getTime(); let date = "06/25/2024"; let overlayDrawerStatus = "1"; let currentDate = new Date(date).getTime(); if (overlayDrawerStatus) { if ($.cookie('overlay-methodSelected') && $.cookie('overlay-methodSelected') == "delivery" && $.cookie('overlay-deliveryDate')) { currentDate = new Date($.cookie('overlay-deliveryDate')).getTime(); } else if($.cookie('overlay-pickupDate')) { currentDate = new Date($.cookie('overlay-pickupDate')).getTime(); } } else { currentDate = new Date(date).getTime(); } if (!is_global[id[3]] && oosToDate >= currentDate && currentDate >= oosFromDate) { if (hasPop.includes(id[3])) {} else { hasPop.push(id[3]); $("#pdp-modal").empty(); $("#pdp-modal").append('Please note that your flavor selection (' + items[id[3]] + ') is only available after ' + toDates[id[3]] + '.

Got it!

'); setTimeout(function() { getPopup().openModal(); }); } } } } $('.optional-option input:radio.bundle-product-option').not(".parent-option").bind('click mousedown', (function() { var isChecked; console.log("clicked radio: "); return function(event) { if (event.type == 'click') { if (isChecked) { isChecked = this.checked = false; $("#bundle-option-" + $(this).attr('data-option-group')).click(); } else { isChecked = true; } } else { isChecked = this.checked; } } })()); $('.select-options.msg_card select').on('change', function() { var selected_text = $(this).find("option:selected").text(); if (selected_text.indexOf('Custom Message') != -1) { /** * There are multiple custom message containers, The below code is to * show the bottom custom message container next to the (.select-options.msg_card select) * select instead of top custom message container. */ $(this).parent().parent().parent().siblings("#custom_message_container").show(); } else { $("#custom_message_container textarea").val(''); $(this).parent().parent().parent().siblings("#custom_message_container").hide(); } $(".field.choice.sentiment-group-" + this.value).css('display', 'block'); }); $('.select-options.chalkboard_card select').on('change', function() { var selected_text = $(this).find("option:selected").text(); if (selected_text.indexOf('Teacher') != -1) { $("#chalkboard_message_container").show(); } else { $("#chalkboard_message_container").hide(); } $(".field.choice.sentiment-group-" + this.value).css('display', 'block'); }); $('.sentiment_custom_select select').on('change', function() { $(".field.choice.sentiment-group-" + this.value).css('display', 'block'); $("#bundle-option-" + this.value + "-qty-input").val(1); $("#bundle-option-" + this.value).click(); }); $('.plus').click(function(e) { let submitStr = $('#product-addtocart-button-top span').text().toLowerCase(); if ($('#product-addtocart-button-top').prop('disabled') && submitStr == 'out of stock') { $(this).attr("disabled", "disabled"); return; } let input = $("#bundle-option-" + $(this).attr('data-id')); let qty_input = $("#bundle-option-" + $(this).attr('data-id') + "-qty-input"); if ($('.bundle-option-group-' + $(this).attr('data-option-id')).hasClass("max-min-qty")) { let sumOfValues = 0; let container_id = '.bundle-option-group-' + $(this).attr('data-option-id'); $(container_id + ' .chk_qty').each(function(i, item) { sumOfValues = parseInt(item.value) + sumOfValues; }); if ($(this).attr('data-maxqty') > sumOfValues) { e.preventDefault(); $(this).siblings('.minus').removeAttr("disabled"); $(this).prev().val(+$(this).prev().val() + 1); if ($(this).attr('data-maxqty') == (sumOfValues + 1) && window.IsBakerySession) { $('.plus.data-max-qty').attr("disabled", "disabled"); $("#product-addtocart-button-top").removeAttr("disabled"); $("#product-updatecart-button-top").removeAttr("disabled"); } } else { e.preventDefault(); $('.plus.data-max-qty').attr("disabled", "disabled"); } $('#checkbox_total_qty').val(sumOfValues + 1); let total = (sumOfValues + 1); let optionData = $(this).attr('data-option-id'); let dataclass = "option-required-"+optionData; let finalqty = $(this).attr('data-maxqty'); let showErrorMsg = 1; addFlagCheckbox(optionData, total, finalqty, dataclass, showErrorMsg); } else { $(this).prev().val(+$(this).prev().val() + 1); $(this).siblings('.minus').removeAttr("disabled"); e.preventDefault(); } if (input.is(":checked")) { input.prop('checked', false).trigger('click'); } if ($(this).prev().val() == 1) { input.prop('checked', false).trigger('click'); } }); function addFlagCheckbox(optionData, total, finalqty, dataclass, showErrorMsg){ $("#product-addtocart-button-top").removeAttr('disabled'); if(total == parseInt(finalqty)){ $(".bundle-option-group-"+optionData+" .mage-error").hide(); $("."+dataclass).html("completed"); $("."+dataclass).css("background-color", completeddBgColor); $("#product-addtocart-button-top").removeAttr('disabled'); $('.error-add-to-cart-checkbox').html(''); }else{ $(".bundle-option-group-"+optionData+" .mage-error").show(); $("."+dataclass).html("Required"); $("."+dataclass).css("background-color", requiredBgColor); $("#product-addtocart-button-top").removeAttr("disabled"); $('.error-add-to-cart-checkbox').html('Please select one of the options.'); if(showErrorMsg == 1) { generateErrorMsg(); } } } $('.minus').click(function(e) { var input = $("#bundle-option-" + $(this).attr('data-id')); let qty_input = $("#bundle-option-" + $(this).attr('data-id') + "-qty-input"); if ($(this).next().val() > 0) { e.preventDefault(); $(this).next().val(+$(this).next().val() - 1); $('.plus').removeAttr("disabled"); if ($(this).attr('data-layout-type') != 'sent_flag' && $(this).attr('data-layout-type') != 'opt-col-three cust-multi-options') { $("#product-addtocart-button-top").attr("disabled", "disabled"); $("#product-updatecart-button-top").attr("disabled", "disabled"); } } else { if ($(this).attr('data-lessmore') == "1") { $(".field.choice.sentiment-group-" + $(this).attr('data-id')).css('display', 'none'); } else { $(this).attr("disabled", "disabled"); } e.preventDefault(); } if (input.is(":checked")) { input.prop('checked', false); if ($(this).next().val() > 0) { input.trigger('click'); } if ($(this).next().val() == 0) { input.trigger('click'); input.prop('checked', false); $(this).prop("disabled", true); $(this).next().prop('disabled', true); } } if ($('.bundle-option-group-' + $(this).attr('data-option-id')).hasClass("max-min-qty")) { let sumOfValues = 0; let container_id = '.bundle-option-group-' + $(this).attr('data-option-id'); $(container_id + ' .chk_qty').each(function (i, item) { sumOfValues = parseInt(item.value) + sumOfValues; }); $('#checkbox_total_qty').val(sumOfValues); let total = (sumOfValues); let optionDatas = $(this).attr('data-option-id'); let dataclasses = "option-required-"+optionDatas; let finalqtydata = $(this).attr('data-minqty'); let showErrorMsg = 1; addFlagCheckbox(optionDatas, total, finalqtydata, dataclasses, showErrorMsg); } }); $('#addons').click(function() { $(".optional-option").not(".dependent").show(); $('#addons').hide(); }); $('.plus-multi-qty').click(function(e) { e.preventDefault(); $(".minus-multi-qty").removeAttr('disabled'); let input = $(this).siblings(".input-text.qty"); let id = $(this).attr("data-id"); input.val(parseInt(input.val()) + 1); $('#bundle-option-' + id + '-qty-input').val(input.val()).trigger("change"); }); $('.minus-multi-qty').click(function(e) { e.preventDefault(); let input = $(this).siblings(".input-text.qty"); let id = $(this).attr("data-id"); if (input.val() > 0) { input.val(parseInt(input.val()) - 1); $('#bundle-option-' + id + '-qty-input').val(input.val()).trigger("change"); } else { $(this).attr("disabled", "disabled"); } }); $('.bundle-product-option.radio').click(function(e) { $('.qty-control').hide(); $(this).siblings('.qty-control').show(); }); $('select.sent_flag').on('change', function(e) { $("." + $(this).attr('id') + " img").attr("src", $(this).find(':selected').attr('data-image')); }); if (disableAddToCart) { $("#product-addtocart-button-top").prop('disabled', true); $("#product-updatecart-button-top").prop('disabled', true); $("#product-addtocart-button-top-disabled").prop('disabled', true); }else{ $("#product-addtocart-button-top").removeAttr('disabled'); } $("#product-addtocart-button-top").click(function(){ let getmaxqty = $('.option_assortment_label').text(); let getfinalqty = getmaxqty.split("Your selection must add up to")[1]; let total = $('#checkbox_total_qty').val(); if(parseInt(getfinalqty) > parseInt(total)){ generateErrorMsg(); }else{ $(".error-add-to-cart-checkbox").html(""); } }); function generateErrorMsg(){ if($('.error-add-to-cart-checkbox').length == 0){ let msgCheckBox = 'Please select one of the options.'; let errorMsgClass = 'error-add-to-cart-checkbox'; $("

"+msgCheckBox+"

").insertBefore('.error-message-for-checkbox'); } } setTimeout(function() { if (disableAddToCart) { $("#product-addtocart-button-top").prop('disabled', true); $("#product-updatecart-button-top").prop('disabled', true); } }, 1000); }); });

Gluten-Free Lemon Raspberry Triple Bundtlet Tower (2024)
Top Articles
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 6317

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.