If I have a configurable product id and an associated child product id, how can i determine the specific attribute id and options used for that combination?
Magento – Get configurable option and value if parent and child known
configurable-product
configurable-product
If I have a configurable product id and an associated child product id, how can i determine the specific attribute id and options used for that combination?
Best Answer
Let's assume that the configurable product id is
$mainProductId
and the child product id is$childId
.You can get the configurable attributes like this:
Now you can get the child product values like this: