How to query products?
-
I want to get all my products that have a specific attribute with a specific value.
I want to know how to query products in general through code. Can someone help me out with this?
-
Hello @miguel-barbosa
Override the getAll method and pass your new custom parameters to use it.
Thanks & Regards
-
@Rishabh-Webkul Hello, @Rishabh-Webkul, the getAll method from which class and package?
-
Hello @miguel-barbosa
In the ProductController.php file we have implemented a search method where this is used you can take a reference from there
GitHub File Link
Thanks & Regards
-
How should I go about filling in the ProductController construct parameters, taking into consideration that search cannot be called statically, can you give me somewhere there's an example of this?
I want to understand this controller in depth
-
@Rishabh-Webkul I've extended the ProductController
But now I want to, using a var, get all products with that value in a specific attribute.
How can I achieve this with search?