Answer the question
In order to leave comments, you need to log in
How to group a group of products into one view, in my example?
For example, there is a phone model Nokia99. But in 3 colors. That is, in fact, these are 3 different products. The question is how to present these 3 products to the user as one product with a choice of colors. I would be grateful for advice.
Answer the question
In order to leave comments, you need to log in
If you are only interested in color, you create tables products, colors and intermediate product_colors . You write a relationship to Color
in the Product ManyToMany
model.
As a result, you have a relationship between products and colors and you can make queries on these relationships , depending on the task.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question