- $29.99
- $8.00
- $40.00
- $15.00
- $15.00
- $25.00
- $15.00
- $20.00
- $16.00
- $10.00
- $9.00
- $22.00
- $16.00
- $12.00
- $12.00
- $7.50
- 1
- 2
Clear All
Filters
{
const queryString = new URLSearchParams(new FormData($refs.filter_form)).toString()
loading = true;
fetch('/collections/loose-leaf-teas?' + 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);
})
"
>