Hi,
I have searched hi and low all over the wix forums for some sort of solution, but I can’t seem to get things to work out. I’m not sure what I’m doing wrong here.
I am going to be selling tires, wheels and various other products so the excel data i have is large and it would be nice if people can filter what they are looking for.
Similar to this site https://www.1010tires.com/Wheels/AR+ATX I want a checkbox style filter (that can be expanded and collapsed) like the one attached.
I enabled Corvid, created a new page called “Wheels”. I imported my excel template data into the database called “wheels”, added a repeater from the “lists and grid” templates. I connected all the data from my database. Everything shows when i preview my page.
However, when i add “add multi section” or a “dropdown” from the “Add – User Input” section, I cannot get it connected to my fields from my database.
I would like to add checkboxes so that customers can narrow their search.
I am trying to add the following boxes: Brand, Style, Diameter, Width, Offset, Finish, ect.
PLEASE HELP!!!
Can someone please help me out with this. Perhaps provide me with examples that i can edit, or some type of step by step instructions, rather than links.
Your help is greatly appreciated!!!
******* This is an example from the above website. Checkbox style filter that can be expanded and collapsed.***
I would like to create this on the left side of my web page.
******* This is from my database. These are the columns that i would like to filter.***
From all of my research I was able to ALMOST get it from the help of the tutorial from @codequeen
I was able to get a dropdown, and the list did show on my preview page, however I could not select items from the list to generate my filter and also, the 2nd dropdown was not listing items at all.
**This was for a test to see if i could get it to work. I don’t really want a dropdown, i want a checkbox style filter list.
This is the code that I used.
export function BrandDropdown1_change(event) {
//Add your code for this event here:
}
export function StyleDropdown1_change(event) {
//Add your code for this event here:
}
import wixData from ‘wix-data’;
$w.onReady( function () {
uniqueDropDown1();
});
function uniqueDropDown1 (){
wixData.query(“wheels”)
.limit(1000)
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w(" #BrandDropdown1 “).options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.brand);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}
export function BrandDropdownd1_change(event, $w) {
uniqueDropDown2();
$w(” #StyleDropdown1 “).enable();
}
function uniqueDropDown2 (){
wixData.query(“wheels”)
.contains(“Brand”, $w(” #BrandDropdown1 “).value)
.limit(1000)
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w(” #StyleDropdown1 “).options = buildOptions(uniqueTitles);
});
function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.style);
return [… new Set(titlesOnly)];
}
function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}
$w.onReady( function () {
});
export function wheelBrandDropDown_change(event, $w) {
$w(” #StyleDropdown1 “).enable();
locationCityFilter();
}
function locationCityFilter (){
$w(” #wheel “).setFilter( wixData.filter()
.eq(“fieldkey”, $w(” #dropdown ").value)
);
}
***When i select the brand, it does not display. it still displays the entire inventory.
Thank you for taking the time in reading this long post.