Grouped product data types
The GroupedProduct
data type implements ProductInterface
and PhysicalProductInterface
. As a result, attributes that are specific to grouped products can be used when performing a products
query.
GroupedProduct
The GroupedProduct
object contains the [items]
array:
Attribute | Type | Description |
---|---|---|
items |
[GroupedProductItem] | An array containing grouped product items |
GroupedProductItem
The GroupedProductItem
object contains the following attributes:
Attribute | Type | Description |
---|---|---|
position |
Int | The relative position of this item compared to the other group items |
product |
ProductInterface | The ProductInterface contains attributes that are common to all types of products. Note that descriptions may not be available for custom and EAV attributes |
qty |
Float | The quantity of this grouped product item |
Sample Query
The following query returns information about downloadable product 24-WG085_Group
, which is defined in the sample data.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
products(filter:
{sku: {eq: "24-WG085_Group"}}
)
{
items {
id
name
sku
type_id
... on GroupedProduct {
items{
qty
position
product{
sku
name
type_id
url_key
}
}
}
}
}
}