Get child products of configurable product via Service Contract / API
-
29-09-2020 - |
Domanda
In Magento 2, is it possible to get the associated simple products of a configurable product, via Service Contracts?
The only reference to the product type that I can find is ProductInterface::getTypeId()
, but nothing that gives access to the underlying product type instance.
Soluzione
Yes you can do it by using the getChildren
method from Magento/ConfigurableProduct/Api/LinkManagementInterface
class.
You will have to use the sku as a parameter
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange