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

enter image description here

Print Order enter image description here

How can i get the list of child products and the Qty ordered.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
scroll top