Skip to content

ProductCategory Criterion

The ProductCategory Search Criterion searches for products by the category they're assigned to.

Arguments

  • taxonomyEntries - array of ints representing category IDs

Example

PHP

1
2
3
4
$query = new ProductQuery(
    null,
    new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCategory([2, 3])
);

REST API

1
2
3
4
5
<ProductQuery>
    <Filter>
        <ProductCategoryCriterion>[2, 3]</ProductCategoryCriterion>
    </Filter>
</ProductQuery>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "ProductQuery": {
        "Filter": {
            "ProductCategoryCriterion": [
                2,
                3
            ]
        }
    }
}