Answer the question
In order to leave comments, you need to log in
How to implement properties for different products in an online store?
There is an online clothing store, each product has its own properties, dresses have their own, shirts have their own, bags have their own as in the picture for example:
How to implement it correctly when adding? Simply adding these fields to a table with products is not an option, how can you display the necessary parameters when choosing a category and at the same time all this was stored separately from the products themselves?
Answer the question
In order to leave comments, you need to log in
Look towards EAV. This is an approach when you have only the most basic characteristics in the product table, such as availability, price, and specific ones are stored in a separate table, where each row is one property. Well, another table for the names of characteristics. Approximately like this:
goods{id, name, price}
attribute{id, name}
attribute_value{id, id_attr, id_good, value}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question