A
A
alestro2016-01-19 12:55:13
PHP
alestro, 2016-01-19 12:55:13

Implementation of filters for categories of goods in an online store, how to implement?

There is a table of categories and a table with filters for these categories. In the table with filters, I store a link to the category id and the name of the filter, which is selected from the product attributes. But what about values? Let's say you can filter by brand, or you can filter by screen diagonal, so you need different queries, what to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Bezenson, 2016-01-19
@inferusvv

Well, theoretically, you should have parameters in each row of the product. And when you select products, you specify the selection criteria in the SQL query.
WHERE category_id = 5, display_size > 5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question