Get Simple Product Details Passing Configurable productId and option like color

Using Product Collection I want to fetch this.

1 Answer 1


Used Following code to fetch the details

  $superAttribute = [$color_id => $sel_propduct_color];
    $childProduct   = $product->getTypeInstance()->getProductByAttributes($superAttribute, $product);
    $child_product_id = $childProduct->getID();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.