Answer the question
In order to leave comments, you need to log in
Where can I get data for the filter for goods in the online store?
Hello, in general I won’t buy how the product filtering system works in online stores.
Let's say in the database I have a category "Smartphones"
{
smartphones: [
{
"name": "iPhone 12 Mini",
"price": 62000,
"color": "black",
"manufacturer": "Apple"
},
{
"name": "Samsung Galaxy Fold",
"price": 74000,
"color": "white",
"manufacturer": "Samsung"
},
..........
]
}
dataForFilter = {
color: ['black', 'white'],
manufacturer: ['Apple', 'Samsung']
...
}
{
smartphones: {
productList: [ ... тот же массив телефонов ... ],
productFilter: [
{
name: "color",
type: "checkbox",
value: ["white", "black"]
},
{
name: "manufacturer",
type: "checkbox",
value: ["Apple", "Samsung"]
}
],
}
}
Answer the question
In order to leave comments, you need to log in
Google for "faceted search". Typically, this function is performed by a full-text search engine that does the first paragraph for you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question