Order Items Collection in Order Detail Page
-
20-02-2021 - |
La solution
Check the assigned block to render the order items defined in layout file vendor\magento\module-sales\view\adminhtml\layout\sales_order_view.xml
<block class="Magento\Sales\Block\Adminhtml\Order\View\Items" name="order_items" template="Magento_Sales::order/view/items.phtml">
Block method \Magento\Sales\Block\Adminhtml\Order\View\Items::getItemsCollection()
responsible for serving order item data to this page template.
You can get an idea to filter order item data on that collection in order model:
\Magento\Sales\Model\Sales::getItemsCollection($filterByTypes = [], $nonChildrenOnly = false);
Autres conseils
Magento\Sales\Block\Adminhtml\Order\View\Items:getItemsCollection
Is the method for getting items for section,If you want to MOdify that item collection then you have to work on that method