Skip to content

ProductCode Criterion

The ProductCode Search Criterion searches for products by their codes.

Arguments

  • productCode - array of strings representing the product codes(s)

Example

PHP

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

REST API

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