Skip to main content
Improving the answer
Source Link
Rafael Corrêa Gomes
  • 13.7k
  • 14
  • 91
  • 181

You can get the type instance in your bundle product, then get the children IDs, as below.

$typeInstance = $product->getTypeInstance();
$requiredChildrenIds = $typeInstance->getChildrenIds($product->getId(), true);
$typeInstance = $product->getTypeInstance();
$requiredChildrenIds = $typeInstance->getChildrenIds($product->getId(), true);

You can get the type instance in your bundle product, then get the children IDs, as below.

$typeInstance = $product->getTypeInstance();
$requiredChildrenIds = $typeInstance->getChildrenIds($product->getId(), true);
added 6 characters in body
Source Link
Rafael Corrêa Gomes
  • 13.7k
  • 14
  • 91
  • 181

$typeInstance = $product->getTypeInstance(); $requiredChildrenIds = $typeInstance->getChildrenIds($product->getId(), true);

$typeInstance = $product->getTypeInstance();
$requiredChildrenIds = $typeInstance->getChildrenIds($product->getId(), true);

$typeInstance = $product->getTypeInstance(); $requiredChildrenIds = $typeInstance->getChildrenIds($product->getId(), true);

$typeInstance = $product->getTypeInstance();
$requiredChildrenIds = $typeInstance->getChildrenIds($product->getId(), true);
Source Link

$typeInstance = $product->getTypeInstance(); $requiredChildrenIds = $typeInstance->getChildrenIds($product->getId(), true);