anyone know how we can call custom phtml in order detail page admin side.

enter image description here

1 Answer 1


I think you should override template Magento_Sales::order/view/history.phtml file by using below code.


<referenceBlock name="order_history">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Vendor_Module::order/view/history.phtml</argument>

Then, copy main Magento_Sales::order/view/history.phtml to your Vendor_Module and modify it as per your requirement

  • This way I am already working on but without that did you have any idea???? Commented Sep 26, 2018 at 10:56
  • I do not think so if any other Magento way to do the same but if you really want to do that, you can add that block to anywhere in order total section then prepend or append it with comment box using jquery or js.
    – Pribhav
    Commented Sep 26, 2018 at 11:39
  • In the same way, we are doing. Did u know after over right template how we can load custom phtml through knockout js?? Commented Sep 26, 2018 at 11:51
  • If you add a block to anywhere you do not need to override history template. I was talking about to add a custom block in sales_order_view with a custom template and then using jQuery js you can move the element. But if you do it via knockout js I think this is the suitable tutorial webkul.com/blog/use-knockout-js-custom-template-magento2
    – Pribhav
    Commented Sep 26, 2018 at 12:12
  • Ok i will review and update according. Commented Sep 26, 2018 at 12:25

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.