Magento 2 option products of bundle are not showing in my orders magento core
-
04-03-2021 - |
Question
I need the Qty of bundle options that I have ordered.
I can see getChildrenItems() on getting the count it returns me 1, it doesn't include child products.
Bundle/templates/sales/order/items/renderer.phtml
$items = array_merge([$parentItem], $parentItem->getChildrenItems());
renderer.phtml loads for both my orders and print order, For print I can see child product.
My Order
How can i get the list of child products and the Qty ordered.
Solution
With your core module Sales Remove
Magento/Sales/Block/Order/Items.php
//$this->itemCollection->filterByParent(null);
https://github.com/magento/magento2/issues/16434
https://github.com/magento/magento2/commit/7e78060c166672fbbd069875812856856d6815f8
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange