I'm developing a custom module in magento 2.
I need to change the file located in Magento/Sales/view/Adminhtml/Templates/Items/Column/name.phtml
.
How can I override file in custom extension?
Try following way:
Vendor/Module/view/adminhtml/layout/sales_order_view.xml
<?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"> <body> <referenceBlock name="column_name"> <action method="setTemplate"> <argument name="template" translate="true" xsi:type="string">Vendor_Module::order/items/column/name.phtml</argument> </action> </referenceBlock> </body> </page>
Copy original file into following location:
Vendor/Module/view/adminhtml/templates/order/items/column/name.phtml
Clear cache.
<referenceBlock name="column_name" template="Vendor_Module::order/items/column/name.phtml"/>
Feb 2, 2017 at 7:33
magento/module-payment/view/adminhtml/templates/info/substitution.phtml