Answer the question
In order to leave comments, you need to log in
Categories and filters in the online store?
How to make filters for each product in the online store?
For example, there are watches that have such features as: manufacturer, dial diameter, type (sport, fashion...), strap material, etc.
And there are also jeans that are completely different ( color, length, season, etc. ).
Do you really have to create many tables in the database for each product separately, and add columns to them for each type of product?
PS Do not offer implementation on engines!
Answer the question
In order to leave comments, you need to log in
All of the above is stored in the additional characteristics of the product, when the list of products of the category is displayed, a faceted filter is built that includes only the characteristics that the products of this list have. For all characteristics, the value type is defined: number, range, flag (boolean) and the expected number of values. Based on this, a ui-component is selected in the filter: a simple selection list from the possible form of a group of checkboxes, or, more often, a drop-down list, a slider for ranges, the scale of which is calculated from the maximum and minimum value of a characteristic in a given list of products, a checkbox for binary characteristics, radio buttons for mutually exclusive
OK. Let's break the stereotypes. They threw out the option with the database. =)
Where will be stored all the parameters "manufacturer, dial diameter, type (sport, fashion...), strap material, etc."????
You can create one table where there will be common elements (price, manufacturer, name, etc.). And add a field to connect other parameters. For each product category, create tables with additional fields.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question