Magento 2 How to get child item id of configurable product by super attribute details?

Let’s assume you know configurable product id and used child product super attribute details.
Example from Magento Sample data configurable product name Chaz Kangeroo Hoodie,  Configurable product id is 67.
Super attribute Array details,

Using the bove details how we can get details of child item.

Refer below code snippet for Get child item id of a Configurable product by child’s Attribute details.

Call function,

Result is 52(Product name Chaz Kangeroo Hoodie-XS-Black). Using above way we got the child item data.

Leave a Reply

Your email address will not be published. Required fields are marked *