Filters
>
Showing 179 products
{
let [param, value] = filter.split('=');
console.log({ param, value });
if (!filters[param]) {
filters[param.replaceAll('?', '')] = [value];
} else {
filters[param.replaceAll('?', '')].push(value);
}
});
}
// Verificar si el filtro a agregar ya existe
let [paramToAdd, valueToAdd] = filterToAdd.split('=');
if (filters[paramToAdd] && filters[paramToAdd].includes(valueToAdd)) {
// Si existe, quitarlo de los filtros
filters[paramToAdd] = filters[paramToAdd].filter(value => value !== valueToAdd);
} else {
// Si no existe, agregarlo a los filtros
if (!filters[paramToAdd]) {
filters[paramToAdd] = [valueToAdd];
} else {
filters[paramToAdd].push(valueToAdd);
}
}
// Formatear los filtros para la URL
const filterParams = Object.entries(filters).map(([param, values]) => {
return values.map(value => `${param}=${value}`).join('&');
})
const queryString = filterParams.length > 0 ? '?' + filterParams.join('&') : '';
// Almacenar la query en el dataset
document.querySelector('.filters-wrapper').dataset.filters = queryString;
console.log('This should be desktop only', { queryString });
"
>
Sort by
>
Filters & Sort
>
×
Sort By
>
{
let [param, value] = filter.split('=');
console.log({ param, value });
if (!filters[param]) {
filters[param.replaceAll('?', '')] = [value];
} else {
filters[param.replaceAll('?', '')].push(value);
}
});
}
// Verificar si el filtro a agregar ya existe
let [paramToAdd, valueToAdd] = filterToAdd.split('=');
if (filters[paramToAdd] && filters[paramToAdd].includes(valueToAdd)) {
// Si existe, quitarlo de los filtros
filters[paramToAdd] = filters[paramToAdd].filter(value => value !== valueToAdd);
} else {
// Si no existe, agregarlo a los filtros
if (!filters[paramToAdd]) {
filters[paramToAdd] = [valueToAdd];
} else {
filters[paramToAdd].push(valueToAdd);
}
}
// Formatear los filtros para la URL
const filterParams = Object.entries(filters).map(([param, values]) => {
return values.map(value => `${param}=${value}`).join('&');
})
const queryString = filterParams.length > 0 ? '?' + filterParams.join('&') : '';
// Almacenar la query en el dataset
document.querySelector('.filters-wrapper').dataset.filters = queryString;
console.log('This should be mobile only', { queryString });
"
>
View
Low Tide
Quick View
Surfs Up 2.5"
Quick View
Surfs Up 4"
Quick View
Surfs Up 6"
Quick View
Switchback Tee
Quick View
Shredders 2-in-1
Quick View
Rec Hat
Quick View
Victory Jacket
Quick View
Victory Jacket
Quick View
Speedsters X
Quick View
Tie Breaker 2.5"
Quick View
Crusher Crop | Boston
Quick View
High Country
Quick View
Crop Hop Built-In | CA
Quick View
Crusher Crop
Quick View
Dawn To Dusk
Quick View
Dawn To Dusk
Quick View
Dawn To Dusk Vest
Quick View
Dawn To Dusk Vest
Quick View
High Country LS Flannel
Quick View
High Country LS Corduroy
Quick View
High Country Jacket Cropped
Quick View
High Country Jacket
Quick View
Thigh Time
Quick View
Feelin' Fine 4"
Quick View
Quadtastic
Quick View
Zip n' Zoom Vest 2.0
Quick View
High Country Jacket
Quick View
Low Light Speed Tights
Quick View
Catch Me If You Can | Relax High-Rise
Quick View
Hopper | Relax Mid-Rise
Quick View
Beach Break
Quick View
Surf n' Turf 4"
Quick View
Surf n' Turf 4"
Quick View
Let 'er Zip Jacket 2.0
Quick View
Let 'er Zip Vest 2.0
Quick View
Fleece Of Mind
Quick View
Fleece Of Mind
Quick View
Fleece Of Mind Zip
Quick View
Shorteez
Quick View
Ready? Let's Bun
Quick View