Skip to content

Issue with overriding /magento/vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml

I need to override template magento/vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml and I have following setup of files.

Module name : Iwdat_AddressExt278

/Block/Adminhtml/Order/View/Info.php

<?php

namespace IwdatAddressExt278BlockAdminhtmlOrderView;

class Info extends MagentoSalesBlockAdminhtmlOrderViewInfo
{
    protected function _construct()
    {
        $this->_template = 'Iwdat_AddressExt278::order/view/info.phtml';
        parent::_construct();
    }
}

** /etc/adminhtml/di.xml**

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="MagentoCustomerBlockAdminhtmlEditTabViewPersonalInfo" type="IwdatAddressExt278BlockAdminhtmlEditTabViewPersonalInfo"/>
    <preference for="MagentoCustomerBlockAdminhtmlOrderViewInfo" type="IwdatAddressExt278BlockAdminhtmlOrderViewInfo"/>
</config>

And I have updated version of template at /view/adminhtml/templates/order/view/info.phtml , but it is not overriding the core template.

enter image description here

Can someone please let me know how to make this attempted template overriding effective, or other possible alternatives.

Thanks and Best Regards

Indunil