Skip to content

ProductType Criterion

The ProductType Search Criterion searches for products by their codes.

Arguments

  • productType - array of strings representing the Product type(s)

Example

PHP

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

REST API

1
2
3
4
5
<ProductQuery>
    <Filter>
        <ProductTypeCriterion>desk</ProductTypeCriterion>
    </Filter>
</ProductQuery>
1
2
3
4
5
6
7
{
    "ProductQuery": {
        "Filter": {
            "ProductTypeCriterion": "desk"
        }
    }
}