Question

enter image description here

This snapshot of order detail page. I Just want to known that which file or function call for setting this collection in this page. I want to just get Selected (Filter Row) Items Order.

Was it helpful?

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);

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top