{
const queryString = new URLSearchParams(new FormData($refs.filter_form)).toString()
loading = true;
filtersActive = true;
fetch('/collections/teas-seasonal-treats?' + 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;
// update url without refreshing the page
history.replaceState(null, null, '?' + queryString);
})
.catch(error => console.error('Error:', error))
.finally(() => {
loading = false
filtersActive = true
});
})
"
>
Filter:
Show: All
-
The Tea Collective Earl Grey 'Blue Flower" Loose Leaf Tea
Regular price $32.98 -
The Tea Collective Ginger Zing Loose Leaf Tea
Regular price $32.98 -
The Tea Collective Chocolate Coconut Chai Loose Leaf
Regular price $32.98 -
The Tea Collective Mon Coeur Loose Leaf Tea
Regular price $32.98 -
The Tea Collective Spoon Gold
Regular price $16.98 -
The Tea Collective Spoon Silver
Regular price $16.98