T
T
Torento203452021-11-03 22:44:53
Database design
Torento20345, 2021-11-03 22:44:53

How to create a dynamic filter for products?

Tell me how to make a dynamic filter for products
. In terms of the fact that fruits have some filters, sweets have others, but they also have common ones.
For example, we can create a table with filters
AND a table with the values ​​of these filters The

question is, how can we indicate in the product which filters we have attached to it and their values?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Vodakov, 2021-11-04
@Torento20345

For example, there is a table with filter values ​​like: productId, attrId, attrValue .
One product has attributes: Manufacturer, Size, Color
Another has attributes: Power, Color, Cable length.
You display the types of filters that the products in the selection have.
Thus, as long as you have all the products in the selection, you display all the possible filters that are. As soon as the user has completed the selection, say, by color, only the products of this color were included in the selection, and again only those attributes that the selected products have are available for selection.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question