Questions tagged [search-criteria]
The search-criteria tag has no usage guidance.
12
questions
14
votes
2
answers
16k
views
Magento 2: Product Repositories, Filter Groups, and `AND`
I'm trying to use a product repository to fetch a list of products. I want to fetch based on two filters, combined with an AND criteria, but things don't seem to be working. Do I not understand how ...
29
votes
2
answers
39k
views
Filtering a Magento 2 Object Repository
In Magento 2, can you use a product repository to filter by product attributes?
In Magento 2, you can use a search criteria object
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria,
...
11
votes
3
answers
25k
views
Magento2: How to add multiple AND and OR conditions to filter/filterGroups?
The question is too close to this topic:
Magento 2: Product Repositories, Filter Groups, and `AND`
but is it possible to create criteria with multiple OR and AND?
In my case i would like to create ...
7
votes
2
answers
9k
views
Using searchCriteria while searching attributes in magento 2.0
Fetching attribute info, if I apply multiple filters in a single search criteria, it does not work. But in case of single filter it works perfectly.
Multiple filters HTTP request:
http://192.168.1....
25
votes
2
answers
32k
views
What are the allowed condition types in Magento 2?
What is the list of allowed condition types while adding filter to search criteria in Magento 2?
All of the examples about search criteria in the internet use eq condition type. Is there any other? ...
4
votes
1
answer
2k
views
How to use V1/search to get the names and SKU's of the magento products
How to use V1/search to get the names and SKU's of the magento products?
I need a text based search to get the names and SKU's of the magento products. While using V1/products API, the response is ...
2
votes
1
answer
4k
views
How can we return an array of search results in APIs Magento 2
I need to return array of search results and so far I did this.
DashBoardInterface.php
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
...
1
vote
1
answer
368
views
SearchCriteria Logical OR and AND search
I am trying to get a search criteria to become the following SQL:
WHERE (a = 1 AND b = 2) OR (c = 3)
Magento2 Documentation only has the example where AND and OR are reversed. Is this even possible? ...
1
vote
1
answer
3k
views
Magento2 Rest Api Search Criteria not working properly!
I am trying to get the sales orders from magento2 REST API. I am using the below query to get the complete orders within entity_id range:
$ch = curl_init( Helper::getURL() . "orders?searchCriteria[...
1
vote
1
answer
2k
views
filtering orderList with multiple filter searchCriteria in 'AND' logic
I am trying to filter the order list based on two filters.
So far, all of my attempts failed and didn't work. The filter is not working properly and it returns very first order in list of orders in ...
0
votes
2
answers
2k
views
searchCriteriaBuilder using multiple sort
I've been experimenting with SearchCriteriaBuilder but I can't seem to get the syntax right to apply multiple sort.
I've tried this
$this->searchCriteriaBuilder->addFilter(EntryInterface::...
0
votes
1
answer
973
views
How to use custom product attribute in sorting option with search criteria builder for magento 2?
I have created one custom product attribute(bestseller). Now I want to sort by custom product attribute(bestseller) using search criteria builder sort by option but it's not working for custom product ...