在Magento 2中将过滤器添加到搜索条件时,允许的条件类型的列表是什么?
有关Internet使用eq
条件类型中搜索条件的所有示例。还有其他吗?您在某处有完整的清单吗?
编辑1:请看下面的代码块。我对condition_type有哪些选择?
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */
$productRepository = $objectManager->get(\Magento\Catalog\Api\ProductRepositoryInterface::class);
/** @var \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder */
$searchCriteriaBuilder = $objectManager->get(\Magento\Framework\Api\SearchCriteriaBuilder::class);
/** @var \Magento\Framework\Api\FilterBuilder $filterBuilder */
$filterBuilder = $objectManager->get(\Magento\Framework\Api\FilterBuilder::class);
$filterSpecialPrice = $filterBuilder->setField('special_price')
->setValue('0')
->setConditionType('eq')
->create();
$searchCriteria = $searchCriteriaBuilder->addFilter($filterSpecialPrice)
->create();
$productCollection = $productRepository->getList($searchCriteria);