I'm following https://ranasohel.me/2015/10/02/how-to-overwrite-sales-view-order-phtml-file-in-magento2/

I would like to override magento\vendor\magento\module-shipping\view\adminhtml\templates\order\view\info.phtml

How to do this?

3 Answers 3


I've faced the same issue if i refrence to order_info block, you need to reference to order_shipping_view block instead


<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="order_shipping_view">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Namespace_Module::order/view/info.phtml</argument>


<h1> Override Success </h1>
<h2> Put Your desire content here </h2>

flush magento cache, do setup:upgrade


One of the easiest way is that we will create a new backend admin: How to enable custom admin theme in Magento 2.


The second way, set our custom template


<referenceBlock name='order_info'>
    <argument name='template' xsi:type='string'>Vendor_Module::order/view/info.phtml</argument>

Load custom module layout after shipping


        <module name="Magento_Sales"/>
  • Does is need to create new theme for this? Can't we override with Magento Default Backend Theme?
    – Jackson
    Nov 30, 2016 at 2:39
  • It depends on your need. If you don't need to create a custom theme, we can choose the second. Nov 30, 2016 at 2:41
  • 1
    Ok I'm using Second Way. sales_order_view.xml is <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="order_info"> <action method="setTemplate"> <argument name="template" xsi:type="string">Custom_Module::order/view/info.phtml</argument> </action> </referenceBlock> </body> </page> Where to put sequence code?
    – Jackson
    Nov 30, 2016 at 2:43
  • In etc/module.xml Nov 30, 2016 at 2:45
  • So my module.xml will be <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Custom_Module" setup_version="1.0.1"> <sequence> <module name="Magento_Shipping"/> </sequence> </module> </config>
    – Jackson
    Nov 30, 2016 at 3:07

I just ran into this same issue with version 2.3.2. I could not get the above solutions to work for some reason. Finally I just tried copying the full xml from vendor/magento/module-shipping/view/adminhtml/layout/sales_order_view.xml to my own extension app/code/Vendor/Module/view/adminhtml/layout/sales_order_view.xml

You then just need to copy the template file Magento_Shipping::order/view/info.phtml and move it to you custom extension and make the changes you need.

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.