How to get a child's parent product id in Magento 2 for the configurable products?
I want to get the parent product id of child product in Magento based on child product id.
configurable-productmagento2productproduct-attribute
How to get a child's parent product id in Magento 2 for the configurable products?
I want to get the parent product id of child product in Magento based on child product id.
Best Answer
For getting the parent product id in your phtml file, you can call code directly by: