Skip to content

SelectionAttribute Criterion

The SelectionAttribute Search Criterion searches for products by the value of their selection attribute.

Arguments

  • identifier - string representing the attribute
  • value - array of strings representing the attribute values

Example

PHP

1
2
3
4
5
6
7
$query = new ProductQuery(
    null,
    new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\SelectionAttribute(
        'fabric_type',
        ['cotton']
    )
);

REST API

1
2
3
4
5
6
7
8
<AttributeQuery>
    <Query>
        <SelectionAttributeCriterion>
            <identifier>fabric_type</identifier>
            <value>[cotton]</value>
        </SelectionAttributeeCriterion>
    </Query>
</AttributeQuery>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
    "AttributeQuery": {
        "Query": {
            "SelectionAttributeCriterion": {
                "identifier": "fabric_type",
                "value": [
                    "cotton"
                ]
            }
        }
    }
}