Answer the question
In order to leave comments, you need to log in
Is it right to do a product filter this way?
Hello! It is necessary to implement a filter for products in the i-shop category. My thoughts on this:
Create a widget with a form to place it in the desired view, the form will pass in the url something like this:
site.com/category/1?author=john%20doe&in_stock=1&min_price=10&max_price=100
In the controller I check Yii: :$app->request->get('filter_query') and if it exists, I break GET and form a request based on it, then I render the result in the view.
Did I understand everything correctly?
Thank you.
Answer the question
In order to leave comments, you need to log in
Video about filters: https://youtu.be/ymlM9UgrPLU
Video about sorting: https://youtu.be/iEra0lEFfCM
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question