Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question