P
P
prst2016-04-20 16:17:18
PHP
prst, 2016-04-20 16:17:18

How to organize a product filter correctly?

Have a nice day/evening everyone! I got completely confused and tired of rewriting the organization of storage and the filter of goods in a self-written store. Tell me what well-functioning mechanism is used here, how everything is done correctly, so that everything is taken into account. At the moment, I have the following implementation - for the final category of goods, before hammering them into the database, a list of their properties is created, for example, pressure (atm), productivity (m2 / h), mass (kg), etc. Further, the data is already clogged. But! Faced with a bunch of subtleties to which I do not know the approach. For example, some characteristics may be in different units, which is generally fixable at the stage of entering into the database by bringing them to one form, some characteristics may not exist, and some goods may even be without them. Other models may come with a few modifications and their specifications may look like this: a/b/c goods and characteristics: 100/200/300. Or what about the dimensions 210x112x170? What about interval values ​​3.5-7? And if you do a search not in the final category (compressor->screw->mobile->diesel), but at the "upper" level (compressor), then you need to somehow provide for storing the type of product, so that the user would tick off the desired type?
In general, I understand that I dumped the mess, but maybe there are already proven solutions that everyone uses and that allow you to implement the filter later?
PS: I don't know if it's possible to post direct links here, but here's an example of what I need to repeat: aerocompressors.ru orange button at the top "search for products"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kravchik, 2016-04-21
@rkravchik

Use a NoSQL database (Mongu or Postgres JSON fields) to store product attributes.

(compressor->screw->mobile->diesel)
Implement the type of goods through a tag scheme. Moreover, when specifying several tags, their intersection is displayed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question