How to override phtml where name in sale order view in magento2 - Magento Source24

 How to override phtml where name in sale order view in magento2

How to override phtml where name in sale order view in magento2

In this blog post i'm share with you to How to override phtml where name in sale order view in magento2


👉 Create a sales_order_view.xml file in VendorName\ModuleName\view\adminhtml\layout\sales_order_view.xml


<?xml version="1.0" encoding="UTF-8"?>

<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" xsi:type="string">Dww_Quote::items/column/name.phtml</argument>

            </action>

    </referenceBlock>

   </body>

</page>


👉 Create a name.phtml file in VendorName\ModuleName\view\adminhtml\templates\items\column\name.phtml


//write your code in here to override name.phtml

<?php

$blockObj= $block->getLayout()->createBlock('Dww\Quote\Block\Adminhtml\Wheelbuilderjson');

$data=$blockObj->getOrderDeatils();

?>




Deepak Kumar Bind

Success is peace of mind, which is a direct result of self-satisfaction in knowing you made the effort to become the best of which you are capable.

Post a Comment

If you liked this post please do not forget to leave a comment. Thanks

Previous Post Next Post