Skip to content

ProductStock Criterion

The ProductStock Search Criterion searches for products by their numerical stock.

Arguments

  • value - the numerical stock to search for
  • (optional) operator - operator string (= < <= > >=)

Example

PHP

1
2
3
4
$productQuery = new ProductQuery(
    null,
    new Criterion\ProductStock(10)
);
1
2
3
4
$productQuery = new ProductQuery(
    null,
    new Criterion\ProductStock(50, '>=')
);