Answer the question
In order to leave comments, you need to log in
How to properly organize the storage of product parameters so that you can make a subsequent selection?
I have a serious problem that I cannot solve. The salt of my tables is as follows: when creating a product, I go to the page with the category, as you can see, the category has a bunch of parameters, on the product creation page I unload these parameters into inputs, and at the time of product creation, I translate these parameters into json and write them in the params field the Item entity, but here I ran into a problem with the selection, because I can't find products right now, like a phone with >2gb of ram. I realized what a rake I got up to, but another scheme for storing product parameters does not fit into my head at all.
Help to properly organize the storage parameters for the product. Each category has its own set of parameters, the product has the same set of parameters as in the category.
Answer the question
In order to leave comments, you need to log in
You have two options.
1. To store attributes, make a separate table of the type
Product ID, attribute name, value.
Then you can JOIN and condition the attribute values and names.
2. Drive attributes into a full-text index using, for example, a sphinx.
And work with faceted search
sphinxsearch.com/blog/2013/06/21/faceted-search-wi...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question