So I want to design tables and relationships for the product module of an e-commerce solution. For clarification purposes, I will use an example of a highly customisable product that will have:
- Several "classical" attributes like color or size (selected through a normal dropdown menu, with several options, e.g. red, blue or black for color or small, medium and large for size).
- But in addition, some custom attributes (basically text fields or numeric fields, of course selected through text or number input fields) which the users will freely change and define.
The price will depend on every attribute (dropdown + custom), so I will have to write additional logic in both client and server side when appropriate.
My tries so far match the solution given in this question. It works good with "normal" attributes (dropdown ones), but it does not scale well to custom text or number fields because in my scenario, a variant_value
table just does not have any sense.
Any ideas? Thanks in advance.