31 results
{
loading = true;
const query = new URLSearchParams(window.location.search).get('q') || '';
const searchParams = new URLSearchParams({ q: query }).toString();
const filterParams = new URLSearchParams(new FormData($refs.filter_form)).toString();
const no_results = document.querySelector('#NoResults');
fetch('/collections/gifts-by-category?' + searchParams + '&' + filterParams)
.then(response => response.text())
.then(data => {
let html_div = document.createElement('div');
html_div.innerHTML = data;
let product_grid_container = html_div.querySelector('#ProductGridContainer');
let no_results_container = html_div.querySelector('#NoResults');
if (product_grid_container) {
document.querySelector('