After submit shipment in admin and complete order, How to display shipped value in quantity box instead of total qty items like below

enter image description here

I want like this

[1]: https://i.stack.imgur.com/Pyh0f.png

  • If I don't mistaken myself ; Magento seems to generate that array in src/vendor/magento/module-sales/view/adminhtml/templates/order/invoice/create/items.phtml so what you probably want to do is to overwrite or extend or whatever the following block : /** @var \Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Items $block */ in order to make the modification in the getItemHtml and/or getItemExtraInfoHtml
    – Claims
    Nov 8, 2021 at 9:54
  • @Claims already my file override am checking in items.phtml can u plz tell me how to achieve the shipped items value instead of ordered items in qty box
    – User0434
    Nov 8, 2021 at 9:57
  • I guess it depends what you really want to achieve. If you want to change the quantity to invoice for each items; then you just need to set the new value in the items and save the item; it will automatically print you the required value. But if it's just something you want to show in the grid, then you need to go deeper to the renderer and once you are in the right column print the value you want.
    – Claims
    Nov 8, 2021 at 10:06
  • @Claims I want to display shipped items value in qty to invoice box as per screenshot . Right now magento displays ordered items value in qty to invoice box but i want to change it to shipped items value
    – User0434
    Nov 8, 2021 at 10:08
  • I mean. Do you want to make that modification effective just there ? Like just in the input box ? If so ==> Renderer using getItemhtml and/or getItemExtraInfoHtml. But if you want this to be global (I mean, the data being replaced everywhere, like in pdf invoice / export ); then you just have to change the global value for the item everywhere...in this case observer on order save after and/or may be invoice save after to get the items and modify them with the value you want ? Sorry I don't have any more lead in mind.
    – Claims
    Nov 8, 2021 at 10:18

1 Answer 1


Instead of $_item->getQty() use below code for getting shipped value


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.