Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (2024)

Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (1)

MSQC SKU: FBY111973 | MFG SKU: MASQBD214-Q

$17.52

$18.76

Quilters Cash

Earn

36

yards

Description

Wide backing featuring small white dots on an aqua background. An extension of Kim Christopherson’s Kimberbell Basics line, Kimberbell Quilt Backs is a delightful collection of wide backings from Maywood Studio. These backings feature flowers, dots, swirls, and more in many colors. Go wide!

100% Cotton
108" Wide

Details

Brand: Maywood Studio

Collection: Kimberbell 108" Quilt Backing

Color: Aqua/Teal/Turquoise

Designer: Kim Christopherson of Kimberbell Designs

Material: Cotton

Product Type: Fabric

Style: Quilt Backing / Wide Fabrics

Theme: Dots & Spots

Width: 106" / 108" / 110"

MSQC SKU: FBY111973

MFG SKU: MASQBD214-Q

Questions

Free Shipping at $59

View full details

Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (2)

Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (3)

Save to:

Email This Wishlist

`).prependTo('.wishlists-container'); } else { if (statusCode === 404) { $(`

Wishlist not found

`).prependTo('.wishlist-entries'); } else { $(`

We're having trouble loading your wishlist right now. Please try again later.

`).prependTo('.wishlist-entries'); } } } else if (template === 'page') { if (statusCode === 404) { $(`

Wishlist not found

`).prependTo('.wishlist-entries'); } else { $(`

We're having trouble loading this wishlist right now. Please try again later.

`).prependTo('.wishlist-entries'); } } } async function toggleCollectionModal(modal, pageSr, variantId) { populatePdpModal(wishlistApiBase, $('#wishlist-modal'), variantId, true); $('form#add-to-wishlists').attr('data-variant-id', variantId); toggleModal(modal, pageSr, variantId); } async function populatePdpModal(apiBaseUrl, modal, variantId, onPageLoad = false) { $('form#add-to-wishlists div.toggle-create-wishlist').removeClass('cursor-pointer').addClass('pointer-events-none opacity-75'); $('form#add-to-wishlists button:submit').prop('disabled', true).addClass('pointer-events-none opacity-75'); $('.lds-ring').show(); try { const variantCheck = await checkForVariantOnAllLists(apiBaseUrl, variantId); await getWishlistsFromPdp(modal, variantId, variantCheck); $('form#add-to-wishlists div.toggle-create-wishlist').addClass('cursor-pointer').removeClass('pointer-events-none opacity-75'); $('form#add-to-wishlists button:submit').prop('disabled', false).removeClass('pointer-events-none opacity-75'); $('.lds-ring').hide(); } catch (err) { console.error(err); } } async function checkForVariantOnAllLists(apiBaseUrl, variantId) { let entriesWithThisVariant = []; try { const response = await fetch(`${apiBaseUrl}/wishlists?variant_id=${variantId}&auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); const data = await response.json(); if (data.length) { $('svg.wishlist-heart-icon').replaceWith(heartFilledSvg); entriesWithThisVariant = Object.values( data.reduce((acc, obj) => ({ ...acc, [obj.public_id]: obj }), {}) ).map((list) => list.entries) .flat() .filter((entry) => entry.variant_id === parseInt(variantId)); } else { $('svg.wishlist-heart-icon').replaceWith(heartOutlinedSvg); entriesWithThisVariant = []; } } catch (err) { console.error(err); } return entriesWithThisVariant; } async function getFavorites(apiBaseUrl) { let favorites = null; try { const response = await fetch(`${apiBaseUrl}/favorites?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); const data = await response.json(); favorites = data; } catch (err) { console.error(err); favorites = null; } return favorites; } async function getAllWishlists(apiBaseUrl) { $('.loading_spinner').css('display', 'block'); try { const response = await fetch(`${apiBaseUrl}/wishlists?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); if (!response.ok) { $('.loading_spinner').css('display', 'none'); cantLoadMessage('account', response.status, 'index'); throw new Error(); } const data = await response.json(); const saveForLaterList = data.find(({ name }) => name.toLowerCase() === "save for later"); let saveForLaterListId = saveForLaterList ? saveForLaterList.public_id : null; const favoritesList = data.find(({ name }) => name.toLowerCase() === "favorites"); let favoritesListId = favoritesList ? favoritesList.public_id : null; const watchTagList = data.find(({ name }) => name.toLowerCase() === "watch tag"); let watchTagListId = watchTagList ? watchTagList.public_id : null; let createFavorites = !favoritesListId && await getFavorites(apiBaseUrl); let createFavoritesListId = !favoritesListId && createFavorites ? createFavorites.public_id : null; $('.loading_spinner').css('display', 'none'); // re-design var numWish = 0; var followedWishlistId = ""; var followedItems=''; data.forEach((w, index) => { if (w.public_id !== saveForLaterListId && w.public_id !== watchTagListId) { if (favoritesListId && w.public_id === favoritesListId) { createWishlistElement(w, pageValue, favoritesListId); } else { createWishlistElement(w, pageValue); } numWish++; } else if (w.public_id == watchTagListId) { if(w.entries.length >= 1) { followedWishlistId = w.public_id; followedItems = w.entries.length; } } }); if(followedItems > 4) { $("#show-all-followed-collection").addClass("md:flex"); } if(followedItems > 6){ $(".followed-collection-mobile").removeClass("hidden").addClass("flex md:hidden"); } // call function for followed colletion section createFollowedCollections(followedWishlistId) if (numWish >= 2) { console.log("Show list of wishlists"); var emptyWishlist = document.querySelector(".empty-wishlist"); if (emptyWishlist) { emptyWishlist.remove(); var showAllWish = document.querySelector("#show-all-lists-btn"); let wishAllPage = params.get('page'); if (wishAllPage == "all") { showAllWish.style.display="none"; } } } else { // only fav wishlist wich is pre-created showing empty if only this have var onlyFav = document.querySelector(".all-wishlist-items-container"); var showAllBtn = document.querySelector("#show-all-lists-btn"); onlyFav.remove(); showAllBtn.remove(); } if (createFavoritesListId) { createWishlistElement(createFavorites, pageValue, createFavoritesListId); } else if (!data.length && !createFavoritesListId) { $('.wishlists-container').append(`

No wishlists found. Create a new list to get started!

`); } fillEmptyThumbnails(pageValue); // move Favorites list to the first position $(`.wishlist-item[data-favorites="1"]`).prependTo('.wishlists-container'); // change this later pageValue === 'index' && itemsPerPage(pages, pageValue); } catch (err) { console.error(err); } } // creating followed collection for wishlist Dashboard async function createFollowedCollections(followedWishlistId) { if(followedWishlistId) { $('.followed-collection-items').empty(); $(".followed-collection-items").addClass("grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 mt-10 gap-8"); const response = await fetch(`${wishlistApiBase}/wishlists/${followedWishlistId}?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); const followedCollectionData = await response.json(); let counter = 0; followedCollectionData.entries.forEach((item, index) => { counter++; if(index <= 5){ let removeEntry = `removeEntry('${item.wishlist_public_id}', ${item.id}, '');`; $(".followed-collection-items").append(`

${item.metafield_key ? ``:''} ${item.metafield_value ? ` ` : ` ` } ${item.metafield_key ? `` : ''}

${item.metafield_key ? `

`:''} ${item.tag_value} ${item.metafield_key ? `

` : ''}

`); } }); if(counter <= 4) { $("#show-all-followed-collection").removeClass("md:flex"); } if(counter > 6) { $(".followed-collection-mobile").removeClass("hidden").addClass("md:hidden flex"); }else{ $(".followed-collection-mobile").removeClass("md:hidden flex").addClass("hidden"); } } else { $("#show-all-followed-collection").removeClass("md:flex").addClass("md:hidden"); $(".followed-collection-mobile").removeClass("flex").addClass("hidden"); } } function createWishlistElement(wishlist, page, favoritesListId = null) { const wishlist_public_id = wishlist.public_id; let wishlist_name = encodeURIComponent(wishlist.name); wishlist_name = wishlist_name.replace(/'/g, '%27'); $('.wishlists-container').prepend(`
${wishlist.name} ${wishlist.entries_count} items

${favoritesListId ? '' : ` ` }

`); const wishlistFiltered = wishlist; wishlistFiltered.entries = wishlist.entries.filter(e => e.variant !== null) if (wishlistFiltered.entries?.length) { injectShopProductIdsForBC(wishlistFiltered.entries, $(`[data-wishlist-id="${wishlistFiltered.public_id}"]`)); let sliced = wishlistFiltered.entries.slice(0, 3); sliced.forEach((entry, i) => { let imgEl = entry.variant ? $(`Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (6)`) : $(`Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (7)`); if (i === 0) { imgEl.addClass(`w-full`); $(`[data-wishlist-id="${wishlist.public_id}"] .featured`).append(imgEl); } else if (i > 0) { $(`[data-wishlist-id="${wishlist.public_id}"] .sub`).append(imgEl); } }); } } // new design edit delete options function confirmNewDeleteList(wishlistId) { const menu = document.getElementById(`menu-${wishlistId}`); menu.classList.toggle('hiddenn'); } $(document).on('click', function(event) { if (!$(event.target).closest('.manage-wishlist-menu').length && !$(event.target).closest('.NewDeleteWishList').length) { $('.manage-wishlist-menu').addClass('hiddenn'); } }); function shareFollowedColl(collectionLink, wishlistName, pageTag) { const shopUrl = "www.missouriquiltco.com"; toggleModal($('#share-wishlist-modal'), 'account'); document.querySelector(".modal-share-title").innerHTML = "Share Your Followed Collection"; document.querySelector(".copy-url-btn.text-white").innerHTML = "Share Now"; $(".public-status-notice p").addClass("hidden"); var pageOrCollection = ""; if(pageTag == 'slp') { var pageOrCollection = "/pages/"; } $("#publicWishlistUrl").val(shopUrl+pageOrCollection+collectionLink); $('.copy-url-btn').attr('onclick', `publicStatus(true, "${wishlistName}", true)`); } // based on wishlist chachbox toggle handling en event of that // Function to handle checkbox change event function handleCheckboxChange(isPublicChecked, isWishlistDetailsPage=null) { var inputField = document.getElementById('list_name'); let checkbox = document.querySelector("#make-public"); let isPublicWish = false; if(isPublicChecked == 'true' || isWishlistDetailsPage) { isPublicWish = true; } if(isPublicWish) { if (checkbox.checked) { inputField.setAttribute('required', 'required'); } else { inputField.removeAttribute('required'); } } else { if (checkbox.checked) { inputField.removeAttribute('required'); } else { inputField.setAttribute('required', 'required'); } } } function newEditWishlist(wishlistId = null, wishlistName = null, isPublic = null, page = null) { const setWishlistName = decodeURIComponent(wishlistName); var inputField = document.getElementById('list_name'); if (inputField) { inputField.setAttribute('required', 'required'); } toggleModal($('#wishlist-modal'), 'account'); if(wishlistId) { $('form#create-or-update-list') .addClass('update-wishlist') .children('.wishlist-actions') .removeClass('flex-col') .addClass('flex-row justify-between items-center') .find('button:submit') .text('Update') .addClass('px-8'); $("#make-public-wish").remove(); $('#wishlist-modal .modal-title').text('Manage Your List'); if (inputField) { inputField.placeholder = setWishlistName; } var formElement = document.querySelector('#create-or-update-list'); if (formElement) { formElement.setAttribute('data-public', isPublic); formElement.setAttribute('data-wishlistid', wishlistId); formElement.setAttribute('data-list-name', setWishlistName); } $(`

`).insertAfter($('input#list_name')); if (isPublic == "true") { $('#make-public').prop('checked', true); } let checkbox = document.querySelector("#make-public"); // Listen for checkbox changes checkbox.addEventListener('change', function() { handleCheckboxChange(isPublic); }); } else { $('#wishlist-modal .modal-title').text('Create list'); $('form#create-or-update-list') .children('.wishlist-actions') .removeClass('update-wishlist') .addClass('flex-row justify-between items-center') .find('button:submit') .html(`${wishlistActionPlus} create a list`) .addClass('px-12 create-new-list shrink-0'); $("#make-public-wish").remove(); var inputField = document.getElementById('list_name'); if (inputField) { inputField.placeholder = "List name"; } } } // for wishlist previews with less than 3 entries // fill blocks that don't have image thumbnails with gray squares function fillEmptyThumbnails(page) { $('.wishlist-preview .featured').each(function (i, el) { if (!$(el).children().length) { $(el).append(`Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (8)`); } }); $('.wishlist-preview .sub').each(function (i, el) { if (!$(el).children().length) { $(el).append('Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (9)Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (10)'); } else if ($(el).children().length === 1) { $(el).append('Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (11)'); } }); } async function deleteWishlist(id) { try { const response = await fetch(`${wishlistApiBase}/wishlists/${id}?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`, { method: 'DELETE', headers: { "Accept": "application/json", } }); const data = await response.json(); pageValue !== 'wishlist' && await toggleModal($('#delete-wishlist-confirm-modal'), 'account'); if (pageValue === 'index' || pageValue === 'all') { $(`.wishlist-item[data-wishlist-id="${id}"]`).remove(); } // change this later pageValue === 'index' && itemsPerPage(pages, pageValue); if (pageValue === 'wishlist') { window.location.href = `https://www.missouriquiltco.com/account?view=wishlist&page=all`; } } catch(err) { console.error(err); } } async function removeEntry(wid, eid, variantId) { try { const response = await fetch(`${wishlistApiBase}/wishlists/${wid}/entries/${eid}?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`, { method: 'DELETE', headers: { "Accept": "application/json", }, }); const data = await response.json(); // change filled heart icon to unfilled (on button click event) // don't remove the element so they have a chance to add it back to their wishlist // if they haven't left or reloaded the page $(`button.heart-${wid}-${variantId}`) .html(heartOutlinedSvg) .addClass('removed') .attr('onclick', `createEntry('${wid}', ${variantId});`) .siblings('img') .addClass('opacity-50'); pageValue === 'wishlist' && $('span#entries-count').text(parseInt($('span#entries-count').text()) - 1); const pageTitle = $('h1#page-title').text(); if(pageValue === 'wishlist' && pageTitle == 'Followed Collection'){ document.querySelector(`[data-wishlistitemid="${eid}"]`).remove(); } else if(pageValue == 'index') { createFollowedCollections(wid); } return data; } catch(err) { console.error(err); } } async function createEntry(wid, variantId) { try { const response = await fetch(`${wishlistApiBase}/wishlists/${wid}/entries?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`, { method: 'POST', headers: { "Content-Type": "application/json", "Accept": "application/json", }, body: JSON.stringify({ variant_id: variantId }) }); const data = await response.json(); $(`button.heart-${wid}-${variantId}`) .html(heartFilledSvg) .removeClass('removed') .attr('onclick', `removeEntry('${wid}', ${data.id}, ${variantId});`) .siblings('img') .removeClass('opacity-50'); if (pageValue === 'wishlist') { $('span#entries-count').text(parseInt($('span#entries-count').text()) + 1); let index = variantsRemoved.indexOf(parseInt(variantId)); if (index !== -1) { variantsRemoved.splice(index, 1); } } return data; } catch(err) { console.error(err); } } function createProductElement(item, i, isEntry, page, variantRemoved = null, followColl) { let parent = isEntry ? $('.wishlist-entries') : $('.recently-viewed .splide__list'); if (followColl) { $("#wishlist-entries-header").removeClass("text-xl").addClass("text-8"); $(".edit-and-delete-btns").remove(); $(".wish-share-options").remove(); $(".mobile-edit-and-delete-btns").remove(); document.querySelector("#page-title").innerHTML = "Followed Collection"; $('a.order-back').attr('href', `/account?view=wishlist`); let removeEntry = `removeEntry('${item.wishlist_public_id}', ${item.id}, '');`; $(parent).append(`

${item.metafield_key ? `` : ''} ${item.metafield_value ? ` ` : ` ` } ${item.metafield_key ? `` : ''}

${item.metafield_key ? `

`:''} ${item.tag_value} ${item.metafield_key ? `

` : ''}

`); } else { let variant = isEntry ? item.variant : item.variants[0]; if (variant === null) return false; let product = isEntry ? item.variant.product : item; let designer = isEntry && variant.product.tags_json['Designer']; let brand = isEntry && variant.product.tags_json['Brand']; let purchaseQty = getPurchaseQty(variant.sku); let atccb = !isEntry ? `'${item.atccb}'` : false; let entryFn = variantRemoved ? `createEntry('${item.wishlist_public_id}', ${variant.id});` : `removeEntry('${item.wishlist_public_id}', ${item.id}, ${variant.id});`; let svg = variantRemoved ? heartOutlinedSvg : heartFilledSvg; let shopProductId = null; if (isEntry && product.metafields.length) { let metafield = product.metafields.find((m) => m.key === 'shop_product_id'); shopProductId = metafield ? metafield.value : null; } $(parent).append(`

Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (14) ${isEntry && window.location.pathname !== '/pages/lists' ? `` : ''}

$${(parseFloat(variant.price) * purchaseQty).toFixed(2)}

$${(parseFloat(variant.compare_at_price) * purchaseQty).toFixed(2)}

${product.title}

${isEntry ? `

${designer ? 'by ' + designer + ' ' : ''}${brand && brand !== designer ? 'for ' + brand : ''}

` : '' }

$${(parseFloat(variant.price) * purchaseQty).toFixed(2)}

$${(parseFloat(variant.compare_at_price) * purchaseQty).toFixed(2)}

`); } } // Recently Viewed products will render on all wishlist account pages async function getRecentlyViewed(apiBaseUrl) { $('.lds-grid.rv-loader').show(); try { const response = await fetch(`${apiBaseUrl}/rec?eng=rv&lim=12&cid=&tag=wishlist`); const data = await response.json(); $('.lds-grid.rv-loader').hide(); if (!data.products.length) { $('section.rv').hide(); } else { data.products.forEach((product, index) => { createProductElement(product, index, false, pageValue); }); splide_check(); } } catch(err) { console.error(err); } } // update: change wishlist name and public status async function updateWishlist(name, makePublic) { var wlp = 0; if(!params.get('wid')) { const wishlistForm = document.querySelector('#create-or-update-list'); var wishlist_id = wishlistForm.getAttribute('data-wishlistid'); wlp++; } else { var wishlist_id = params.get('wid'); } try { const response = await fetch(`${wishlistApiBase}/wishlists/${wishlist_id}?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`, { method: 'PUT', headers: { "Content-Type": "application/json", "Accept": "application/json", }, body: JSON.stringify({ name: name, public: makePublic }) }); const data = await response.json(); if(wlp == 0) { $('h1#page-title').text(data.name); } else { // location.reload() } $('form.update-wishlist input#list_name').attr('placeholder', data.name); $('form.update-wishlist').attr('data-public', data.public); $('form.update-wishlist').attr('data-list-name', data.name); // instead of page loads updated content $('.all-wishlist-items-container').empty(); getAllWishlists(wishlistApiBase); } catch(err) { console.error(err); } } function pageRange(page, lastPage) { let start = page - 2; let end = page + 2; if(end > lastPage){ start -= (end - lastPage); end = lastPage; } if(start <= 0){ end += ((start - 1) * (-1)); start = 1; } end = end > lastPage ? lastPage : end; return {start: start, end: end}; } function publicStatus(isPublic, wishlistName, copyLink) { if (copyLink) { let copyText = document.getElementById('publicWishlistUrl'); copyText.select(); copyText.setSelectionRange(0, 99999); navigator.clipboard.writeText(copyText.value); } $('.confirmed').css('opacity', 1); setTimeout(() => { $('.confirmed').animate({opacity: 0}, 500); },1000); if (!isPublic) { $('.public-status-notice').html('

Your wishlist is now set to Public

'); updateWishlist(wishlistName, true); } } // load products they've added to a specific wishlist async function getItemsInWishlist(apiBaseUrl, wishlistId, startingPage = null) { startingPage && $('.lds-grid.entries-loader').show(); try { const response = await fetch(`${apiBaseUrl}/wishlists/${wishlistId}?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); if (!response.ok) { $('.lds-grid.entries-loader').hide(); if (window.location.pathname === '/pages/lists') { cantLoadMessage('page', response.status); } else { cantLoadMessage('account', response.status, 'wishlist'); } throw new Error(); } const data = await response.json(); if (window.location.pathname === '/pages/lists') { $('#publicWishlistHeader').removeClass('hidden'); $('#wishlistName').text(data.name); $('#entriesCount').text(data.entries.length); $("button.send-list").removeClass("text-[14px]").addClass("md:text-[14px] text-[12px]"); $("button.share-list").removeClass("text-[14px]").addClass("md:text-[14px] text-[12px]"); } // this will set on wishlist items page $('form.update-wishlist input#list_name').attr('placeholder', data.name).attr('required', 'required'); $('form#create-or-update-list').attr('data-public', data.public); $('form.update-wishlist input#make-public').prop('checked', data.public); $('.copy-url-btn').attr('onclick', `publicStatus(${data.public}, "${data.name}", true)`); $('#sendWishlistBtn').attr('onclick', `publicStatus(${data.public}, "${data.name}", false)`); if (data.public) { $('.public-status-notice').html('

Your wishlist is set to Public

'); } else { $('.public-status-notice').html('

Your wishlist will be changed to Public

'); } if (startingPage) { $('.lds-grid.entries-loader').hide(); let entriesCount = data.entries.length; let limit = 8; let numOfPages = Math.ceil(entriesCount / limit); let pageNumbers = Array.from({length: numOfPages}, (_, i) => i + 1); $('h1#page-title').text(data.name); $('form#create-or-update-list').attr('data-list-name', data.name); $('input.public-list-url').val(`https://www.missouriquiltco.com/pages/lists?wishlist_id=${data.public_id}`); // $('.wishlist-breadcrumb').attr('href', '').text(`/ ${data.name}`); $('#wishlist-entries-header') .removeClass() .addClass('text-8') .html(`${data.entries.length} items total`); if (!data.entries.length) { $('.wishlist-entries') .removeClass('grid grid-rows-2 grid-cols-4 gap-8') .addClass('flex flex-col justify-center') .children('.no-wishlist-entries') .removeClass('hidden'); } else { numOfPages > 1 && $('#pagination-container').removeClass('hidden'); $('#page-count').removeClass('hidden'); $('span#total-pages').text(numOfPages); let foundStart = pageNumbers.find((page) => page === startingPage); startingPage = foundStart ? startingPage : 1; getCurrentPageEntries(wishlistId, startingPage, data.entries, limit, pageNumbers); injectShopProductIdsForBC(data.entries, $('#wishlist-entries-container')); } } } catch (err) { console.error(err); } } function generatePagination(wid, array, lim, pageNumbers, page, lastPage) { let pagination = $('
    '); // let previous = $(`
  • `); let previous = $(`
  • ${prevPage}
  • `); previous.on('click', function () { getCurrentPageEntries(wid, checkPrevious(page), array, lim, pageNumbers, true); }); pagination.append(previous); let range = pageRange(page, lastPage); let start = range.start; let end = range.end; let next = $(`
  • ${nextPage}
  • `); next.on('click', function () { getCurrentPageEntries(wid, checkNext(page, lastPage), array, lim, pageNumbers, true); }); pagination.append(next); $('#pagination-container').empty().append(pagination); } function checkPrevious(id) { if (id > 1) { return (id - 1); } return 1; } function checkNext(id, pageCount) { if (id < pageCount) { return (id + 1); } return id; } function getCurrentPageEntries(wid, currentPage, array, lim, pageNumbers, paginated = false) { if (paginated) { $('.wishlist-entries button.add-or-remove-entry').each(function (i, el) { if ($(this).hasClass('removed')) { variantsRemoved.push(parseInt($(this).attr('data-variant'))); } }) } if (array.length > 1) { generatePagination(wid, array, lim, pageNumbers, currentPage, pageNumbers[pageNumbers.length - 1]); } $('.wishlist-entries').empty(); const start = lim * (currentPage - 1); const end = lim * currentPage; let i = 0; array.slice(start, end).forEach((item, index) => { let removed = variantsRemoved.find((v) => v === item.variant.id); if(item.tag_key == "Shop By") { createProductElement(item, index, true, pageValue, removed, true); i++; } else { createProductElement(item, index, true, pageValue, removed); i++; } }); $('#current-page-number').text(currentPage); fixGridRows(i); if (currentPage === 1) { $('li.prev-page').addClass('hidden'); } else { $('li.prev-page').removeClass('hidden'); if (currentPage === pageNumbers.length) { $('li.next-page').addClass('hidden'); } else { $('li.next-page').removeClass('hidden'); } } sessionStorage.setItem('wishlist_returningPage', `wid:${wid}:${currentPage}`); } function fixGridRows(i) { if (i > 0 && i <= 4) { $('.wishlist-entries').removeClass('grid-rows-2'); } } function getPurchaseQty(sku) { let purchaseQty = 1; if (sku.startsWith('FBY') || sku.startsWith('QB') || sku.startsWith('TRIM')) { purchaseQty = 4; } return purchaseQty; } // load more button to show more than 1 row of recently viewed products function loadMore(element) { // $(element).parent().removeClass('-mb-12'); $('[id^="splide01-slide"]').each(function() { let idNumber = parseInt($(this).attr('id').match(/\d+$/)); if (idNumber > 6) { if ($(this).hasClass('md:hidden')) { $(this).removeClass('md:hidden'); $(element).text("Show Less"); } else { $(this).addClass('md:hidden'); $(element).text("Load More"); } } }); } // create new Wishlist async function createWishlist(name) { if (!name) { return; } try { const response = await fetch(`${wishlistApiBase}/wishlists?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`, { method: 'POST', headers: { "Content-Type": "application/json", "Accept": "application/json", }, body: JSON.stringify({ name: name }) }); const data = await response.json(); // this function createWishlistElement which can set new created wishlist as card but create api response in not contains whole things like wishlist public id etc. // bcoz of this getting issue to edit & delete // createWishlistElement(data, pageValue); // to resolve above issue seting this all wishlist items again $('.all-wishlist-items-container').empty(); getAllWishlists(wishlistApiBase); fillEmptyThumbnails(pageValue); $(`.wishlist-item[data-favorites="1"]`).prependTo('.wishlists-container'); pageValue === 'index' && itemsPerPage(pages, pageValue); } catch(err) { console.error(err); } } // load content for respective page that doesn't rely on the api, // then call appropriate functions to inject wishlist data function loadContent(obj, page) { $('h1#page-title').text(obj[page].title); obj[page].hide_elements.forEach((el, i) => { $(el).hide(); }); obj[page].show_elements.forEach((el, i) => { $(el).show(); }); // recently viewed section getRecentlyViewed(recoEngBase); let pageNumber = 1; let returningPage = sessionStorage.getItem('wishlist_returningPage'); if (returningPage && returningPage.startsWith('wid')) { pageNumber = parseInt(returningPage.split(':')[2]); } if (page === 'wishlist') { $('h1#page-title').removeClass('text-3xl').addClass('text-2xl'); getItemsInWishlist(wishlistApiBase, params.get('wid'), pageNumber); $(".wishlist_main_title").removeClass("justify-between").addClass("md:justify-between justify-center"); $('a.order-back') .attr('href', `/account?view=wishlist&page=all`) .children('span') .text('Go Back'); if (params.get('fav')) { $('.edit-and-delete-btns').hide(); $(".mobile-deletebtn-list").hide(); $(".mobile-editbtn-list").hide(); } else { $('#wishlist-modal .modal-title').text('Manage Your List'); $('.svg-container').html(pencilWhiteSvg); $('form#create-or-update-list') .addClass('update-wishlist') .children('.wishlist-actions') .removeClass('flex-col') .addClass('flex-row justify-between items-center') .find('button:submit') .text('Update') .addClass('px-8'); $(`

    `).insertAfter($('input#list_name')); $('.wishlist-actions').prepend(''); $('button.delete-list').attr('onclick', `confirmDeleteList('${params.get('wid')}', '${page}');`); } } else if (page === 'index') { $('a.order-back').removeClass("md:flex"); getAllWishlists(wishlistApiBase); $(".all-wishlist-items-container").removeClass("grid-cols-1").addClass("grid-cols-2 xl:grid-cols-4"); } else if (page === 'all') { getAllWishlists(wishlistApiBase); $('#wishlists-main') .removeClass('bg-white px-4 px-6 py-6') .children('.wishlists-container') .removeClass('md:grid-cols-4 gap-8 md:gap-2') .addClass('gap-12 md:gap-4 -mt-8'); $('.create-new-list-noneindex').addClass("md:flex"); } } async function confirmDeleteList(wishlistId, page) { page === 'wishlist' && !$('#wishlist-modal').hasClass('hidden') && (await toggleModal($('#wishlist-modal'), 'account')); await toggleModal($('#delete-wishlist-confirm-modal'), 'account'); $('button.delete-list-btn').attr('onclick', `deleteWishlist('${wishlistId}');`); } // will need some pagination for customers with many lists/entries // for now this function will only show the initial amount of items per page function itemsPerPage(obj, page) { let size = $(`.page-${page}-item:not(.hidden)`).length; if (size > obj[page].per_page) { let numToHide = size - obj[page].per_page; $(`.page-${page}-item:not(.hidden)`) .slice(-numToHide) .addClass('hidden'); // show all button $("#show-all-lists-btn").addClass("md:flex"); $(".mobile_show_allbtn").addClass("flex md:hidden"); } else { let numToShow = obj[page].per_page - size; $(`.page-${page}-item.hidden`) .slice(-numToShow) .removeClass('hidden'); // show all button $("#show-all-lists-btn").removeClass("md:flex"); $(".mobile_show_allbtn").removeClass("flex md:hidden").addClass("hidden"); } } async function getWishlistsFromPdp(modal, variantId, entries) { try { const response = await fetch(`${wishlistApiBase}/wishlists?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); const data = await response.json(); const saveForLaterList = data.find(({ name }) => name.toLowerCase() === "save for later"); let saveForLaterListId = saveForLaterList ? saveForLaterList.public_id : null; const favoritesList = data.find(({ name }) => name.toLowerCase() === "favorites"); let favoritesListId = favoritesList ? favoritesList.public_id : null; const watchTagList = data.find(({ name }) => name.toLowerCase() === "watch tag"); let watchTagListId = watchTagList ? watchTagList.public_id : null; data.length && data.forEach((w, index) => { if (w.public_id !== saveForLaterListId && w.public_id !== watchTagListId) { let entryFound = entries.filter(entry => entry.wishlist_public_id === w.public_id); createWishlistInputs(w, variantId, entryFound[0]); } }); favoritesListId && $(`.select-wishlist input#${favoritesListId}`).parent().prependTo('.all-lists'); } catch (err) { console.error(err); } } function createWishlistInputs(wishlist, variantId, found) { let featuredImg = null; if (wishlist.entries.length) { featuredImg = wishlist.entries[0].variant ? wishlist.entries[0].variant.product.featured_img_src : null; } $('form#add-to-wishlists .all-lists').prepend(`

    `); } // wishlist form on PDP makes updates to a customer's wishlists regarding // the variant only. They can add or remove the variant to existing lists, // or they can create a new list and add the variant to it at the same time $('form#add-to-wishlists').on('submit', async function(e) { e.preventDefault(); const variantId = '40141244923939'; // // get changes let checked = $(this).find('input:checkbox:checked:not([data-entry-id]):not(#add_to_new_list)'); let unchecked = $(this).find('input:checkbox[data-entry-id]:not(:checked)'); let newWishlistName = $(this).find('input#new-list').length ? $(this).find('input#new-list').val().trim() : null; if (!checked.length && !unchecked.length && !newWishlistName) { toggleModal($('#wishlist-modal'), 'product', variantId); return; } $(this).find('button:submit').prop('disabled', true).addClass('opacity-75 pointer-events-none').html(''); let postReqUrls = []; let deleteReqUrls = []; checked.each(function (i, el) { postReqUrls.push(`${wishlistApiBase}/wishlists/${$(el).attr('id')}/entries?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); }); unchecked.each(function (i, el) { deleteReqUrls.push(`${wishlistApiBase}/wishlists/${$(el).attr('id')}/entries/${$(el).attr('data-entry-id')}?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); }); try { // on pdp if new wishlist name is not empty then go inside fn if(newWishlistName) { let createWishlist = newWishlistName && await fetch(`${wishlistApiBase}/wishlists?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`, { method: 'POST', headers: { "Content-Type": "application/json", "Accept": "application/json", }, body: JSON.stringify({ name: newWishlistName }) }); let createWishlistData = newWishlistName ? await createWishlist.json() : null; const response = await fetch(`${wishlistApiBase}/wishlists?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); if (!response.ok) { $('.loading_spinner').css('display', 'none'); throw new Error(); } const responseData = await response.json(); const newWishlistData = responseData.find(({ id }) => id === createWishlistData.id); let newWishlistPubId = newWishlistData ? newWishlistData.public_id : null; createWishlistData && postReqUrls.push(`${wishlistApiBase}/wishlists/${newWishlistPubId}/entries?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); } await Promise.all(postReqUrls.map(url => fetch(url, { method: 'POST', headers: { "Content-Type": "application/json", "Accept": "application/json", }, body: JSON.stringify({ variant_id: variantId }) } ))).then(async (res) => { return Promise.all( res.map(async (data) => await data.json()) ) }); await Promise.all(deleteReqUrls.map(url => fetch(url, { method: 'DELETE', headers: { "Accept": "application/json", }, }))) .then(async (res) => { return Promise.all( res.map(async (data) => await data.json()) ) }); $(this).find('button:submit').prop('disabled', false).removeClass('opacity-75 pointer-events-none').empty().text('Save'); await toggleModal($('#wishlist-modal'), 'product', variantId); } catch (err) { console.error(err); } }); // create or update wishlist $('form#create-or-update-list').on('submit', async function(e) { e.preventDefault(); $(this).find('button:submit').prop('disabled', true).addClass('opacity-75 pointer-events-none').html(''); let newListName = $(this).find('input#list_name').val().trim(); let listName = !newListName ? $('form.update-wishlist').attr('data-list-name') : newListName; let makePublic = $('form.update-wishlist input#make-public').is(':checked') ? true : false; try { $(this).hasClass('update-wishlist') ? await updateWishlist(listName, makePublic) : await createWishlist(listName); $(this).find('button:submit').prop('disabled', false).removeClass('opacity-75 pointer-events-none').empty().text($(this).hasClass('update-wishlist') ? 'Save' : 'Create'); await toggleModal($('#wishlist-modal'), 'account'); } catch(err) { console.error(err); } }); // if they don't want to add the item to the new list, remove the input // from the DOM so it's not taken into account on the submit event. // only let them create a new list from the PDP if they want to // add the item to it function newWishlistForm(element, variantId = null) { if ($(element).hasClass('create-wishlist-hide')) { $(element).removeClass('create-wishlist-hide'); $(``).insertBefore($(element).parent()); } else { $(element).addClass('create-wishlist-hide'); $('.select-wishlist.new-wishlist').remove(); } } $(document).on('change', 'input:checkbox#add_to_new_list', function () { if (!$(this).is(":checked")) { newWishlistForm($('.toggle-create-wishlist')); } }); async function toggleModal(modal, pageSrc, variantId = null) { if (modal.hasClass('hidden')) { modal.removeClass('hidden'); if (pageValue === 'wishlist' && !params.get('fav')) { $('form.update-wishlist input#list_name').attr('required', 'required'); $("form#create-or-update-list").find('button:submit').text('Update'); $('form.update-wishlist input#make-public').addClass('cursor-pointer'); let checkbox = document.querySelector("#make-public"); let isPublic = checkbox.checked; // Listen for checkbox changes checkbox.addEventListener('change', function() { handleCheckboxChange(false, isPublic); }); } } else { modal.addClass('hidden'); $('#recipients').text(''); $('span#emailCount').text('0'); pageSrc === 'product' && $('form#add-to-wishlists .select-wishlist').remove(); pageSrc === 'account' && $('form#create-or-update-list input').val(''); pageSrc === 'product' && await populatePdpModal(wishlistApiBase, modal, variantId, false); } } function splide_check() { document.querySelectorAll('.splide').forEach(carousel => new Splide(carousel, { type: 'slide', perPage: 2, gap: 2, arrows: false, pagination: false, drag: true, mediaQuery: 'min', breakpoints: { 768: { destroy: true, }, } }).mount()); } function injectShopProductIdsForBC(entries, parentElement) { entries.forEach((entry, i) => { if (entry.variant !== null) { let metafield = entry.variant.product.metafields.length ? entry.variant.product.metafields.find((m) => m.key === 'shop_product_id') : null; let shopProductId = metafield ? metafield.value : null; if (shopProductId) { parentElement.append(``); } } }); } function removeRecipient(element) { var elemText = element.parent().text(); $('span#emailCount').text(parseInt($('span#emailCount').text()) - 1); removeEmailTag(elemText); // element.parent().remove(); } function removeEmailTag(email) { email = email.trim(); const $elem = $(`span[data-shareemail="${email}"]`); $elem.remove(); } $('#recipients').on('keydown', function(event) { let emailAddress, emails, addresses; switch(event.keyCode) { case 13: addresses = $('#recipients').text().split(/(\s+)/); emails = addresses.filter((email) => /(\s+)/.test(email) === false && email !== ''); emailAddress = emails[emails.length - 1]; $(`${emailAddress}`).appendTo('#recipients'); $('#recipients').contents().filter(function(){ return this.nodeType === 3; }).remove(); $('span#emailCount').text(emails.length); const range = document.createRange(); const selection = window.getSelection(); range.setStart(document.getElementById('recipients'), document.getElementById('recipients').childNodes.length); range.collapse(true); selection.removeAllRanges(); selection.addRange(range); return false; break; case 8: if (!$('#recipients').ignore('span').text()) { return false; } break; } }); $.fn.ignore = function(sel) { return this.clone().find(sel || ">*").remove().end(); }; $('button#sendWishlistBtn').on('click', async function(e) { try { let recipients = $('#recipients').text().split(/(\s+)/); let emails = recipients.filter((email) => /(\s+)/.test(email) === false && email !== '').join('&recipients[]='); $('.wishSharesConfirmed-items').html(``); let wid = window.location.pathname === '/pages/lists' ? params.get('wishlist_id') : params.get('wid'); const response = await fetch(`${wishlistApiBase}/wishlists/${wid}?auth=eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f&cid=`); const data = await response.json(); // Loop through the entries, but limit to a maximum of 4 data.entries.slice(0, 4).forEach(entry => { $('.wishlist-shared-entries').append(` `); }); if(emails) { let str = emails.replace(/,*$/, ''); // // send email using belove function var sharedResponse = await shareWishlist(wishlistApiBase, wid, str); if(sharedResponse.status == 200) { $("#wishSharesConfirmed_title").text("Your Wishlist Sent!").removeClass("text-red underline"); toggleModal($('#send-wishlist-modal'), 'account'); toggleModal($('#wishSharesConfirmed'), 'account'); } else { $("#wishSharesConfirmed_title").text("Something Wents Wronge!").addClass("text-orange").removeClass("text-red underline"); toggleModal($('#send-wishlist-modal'), 'account'); toggleModal($('#wishSharesConfirmed'), 'account'); } } else { $("#wishSharesConfirmed_title").text("Please Provide Email").addClass("text-red underline"); toggleModal($('#wishSharesConfirmed'), 'account'); } } catch (err) { console.error(err); } }); // request to email wishlist to 1 or more recipients async function shareWishlist(apiBaseUrl, wid, emails) { try { const response = await fetch(`${apiBaseUrl}/wishlists/${wid}/share?recipients[]=${emails}`, { method: 'POST', headers: { 'Authorization': "crinc-voglia-shopify-customer eyJpdiI6IjF4VENIb0tzMHJ0THJaWkxKOFcvdFE9PSIsInZhbHVlIjoiSkxjaVlma1pEVVgxbzRuNXc0YnRGZz09IiwibWFjIjoiY2JiZmQzNzI2NmQ2MjgyNjZjYmI2M2I0MTRmN2FlY2NkOWY3ZDBlZmJlYTNkZjFkMDY0MGFkN2VkMDg2NDc4NSIsInRhZyI6IiJ9:1732890871::5c04ded153d971b0af8025235de7c5d45fd286870f160acca283b88b65f6dd6f", }, }); const data = await response.text(); return response; } catch (err) { console.error(err); } }

    Other Products In This Collection

    We Think You'll Like These Too

    Ratings & Reviews

    Lorem ipsum dolor sit amet
    consectetur adipisicing elit.

    write a review

    Showing x - x of xx

    sort by

    There are no reviews yet.

    Write a Review

    Questions & Answers

    Ask a Question

    Kimberbell 108" Quilt Backing - Small Dot Aqua Yardage (2024)
    Top Articles
    Latest Posts
    Recommended Articles
    Article information

    Author: Saturnina Altenwerth DVM

    Last Updated:

    Views: 6080

    Rating: 4.3 / 5 (64 voted)

    Reviews: 95% of readers found this page helpful

    Author information

    Name: Saturnina Altenwerth DVM

    Birthday: 1992-08-21

    Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

    Phone: +331850833384

    Job: District Real-Estate Architect

    Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

    Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.