{
let queryString = new URLSearchParams(new FormData($refs.filter_form)).toString();
loading = true;
fetch('/collections/flash-sale?sort_by=' + sort + '&' + queryString)
.then(response => response.text())
.then(data => {
let html_div = document.createElement('div');
html_div.innerHTML = data;
let html_dom = html_div.querySelector('#ProductGridContainer').innerHTML;
document.querySelector('#ProductGridContainer').innerHTML = html_dom;
let productOnThepage = document.querySelectorAll('.poord-card-item-product').length
products_on_page(productOnThepage)
calculateProgressBarWidth()
// update url without refreshing the page
history.replaceState(null, null, '?sort_by=' + sort + '&' + queryString);
})
.catch(error => console.error('Error:', error))
.finally(() => loading = false);
})
"
@filter-push.window="
$nextTick(() => {
loading = true;
fetch($event.detail.new_url)
.then(response => response.text())
.then(data => {
let html_div = document.createElement('div');
html_div.innerHTML = data;
let html_dom = html_div.querySelector('#ProductGridContainer').innerHTML;
document.querySelector('#ProductGridContainer').innerHTML = html_dom;
// move promotion banner on position
let productOnThepage = document.querySelectorAll('.poord-card-item-product').length
showingProductsCount = productOnThepage
products_on_page(productOnThepage)
calculateProgressBarWidth();
// update url without refreshing the page
history.pushState(null, null, $event.detail.new_url);
})
.catch(error => console.error('Error:', error))
.finally(() => {
let queryString = new URLSearchParams(new FormData($refs.filter_form)).toString();
query = queryString
loading = false
});
})
"
@filter-clear.window="
$nextTick(() => {
loading = true;
fetch('/collections/flash-sale')
.then(response => response.text())
.then(data => {
let html_div = document.createElement('div');
html_div.innerHTML = data;
let html_dom = html_div.querySelector('#ProductGridContainer').innerHTML;
document.querySelector('#ProductGridContainer').innerHTML = html_dom;
let productOnThepage = html_div.querySelectorAll('.poord-card-item-product').length
showingProductsCount = productOnThepage
products_on_page(productOnThepage)
calculateProgressBarWidth();
// update url without refreshing the page
history.pushState(null, null, '/collections/flash-sale');
})
.catch(error => console.error('Error:', error))
.finally(() => {
let queryString = new URLSearchParams(new FormData($refs.filter_form)).toString();
query = queryString
loading = false
});
})
"
@filter-more.window="
$nextTick(() => {
loading = true;
fetch($event.detail.new_url)
.then(response => response.text())
.then(data => {
let html_div = document.createElement('div');
html_div.innerHTML = data;
let paginationEl = document.querySelector('#product_pagination')
const button = document.querySelector('#product_pagination .button');
const href = button.getAttribute('href');
const url = new URL(href, window.location.origin);
console.log(url)
const pageValue = url.searchParams.get('page');
if(pageValue && parseInt(pageValue) === parseInt(button.getAttribute('data-total-pages'))) {
document.querySelector('#product_pagination').style.display = 'none';
}
let html_dom = html_div.querySelector('#product_grid').innerHTML;
document.querySelector('#product_grid').innerHTML += html_dom;
showingProductsCount = document.querySelectorAll('.poord-card-item-product').length
calculateProgressBarWidth()
document.querySelectorAll('.promotion-card').forEach((element, index) => {
if(index > 0) {
element.classList.add('hidden')
}
})
products_on_page(showingProductsCount)
let pagination_dom = html_div.querySelector('#product_pagination').innerHTML;
if(paginationEl) {
paginationEl.innerHTML = pagination_dom;
}
})
.catch(error => console.error('Error:', error))
.finally(() => loading = false);
})
"
>
-
Apple Cider DonutsRegular price From $7.29Regular price WasUnit price perFree standard shipping when spending over $50Close
Shipped frozen
Freeze to store
Size
Terms & Conditions
Offer valid until 11:59 pm ET on Thursday, 11/07/24. Must enter coupon code CIDERFLASH during checkout. Limit 1 Use Per Customer. Cases and Variety Packs are Excluded. This offer can be combined with other offers that are selected. While supplies last. No raincheck or carry-forward discount is allowed. Use of promo code denotes knowledge and acceptance of terms and conditions. Only authorized purchases will be processed and shipped. We reserve the right to change or cancel any order due to unauthorized, altered, or ineligible use of the offer. Offer valid only at www.katzglutenfree.com.
- Choosing a selection results in a full page refresh.
- Opens in a new window.