How to get child product id's from parent product id in magento2 for configurable product?
I want to get child product id of parent product in magento based on parent product id.
configurable-productmagento2
How to get child product id's from parent product id in magento2 for configurable product?
I want to get child product id of parent product in magento based on parent product id.
Best Answer
Try the below solution:
Suggestion: Don't use object manager directly in your code as its not a best practice. You need to inject the product model class to your respective class then use it.