Skip to content

IsVirtual Criterion

The IsVirtual Search Criterion searches for virtual or physical products.

Arguments

  • (optional) isVirtual - bool representing whether to search for virtual (default true) or physical (false) products.

Example

PHP

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

REST API

1
2
3
4
5
<ProductQuery>
    <Filter>
        <IsVirtualCriterion>true</IsVirtualCriterion>
    </Filter>
</ProductQuery>
1
2
3
4
5
"ProductQuery": {
    "Filter": {
        "IsVirtualCriterion": true
    }
}