Issue
how to display custom filed in the admin panel.
table sales_order,quote cullom name gst
I want to display a field in the sale order. code details click here
Solution
You can override the adminhtml template file "order/view/info.phtml" and add the code to display your GST below billing address section. Refer below code sample.
app/code/Company/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="order_info">
<action method="setTemplate">
<argument name="template" xsi:type="string">Company_Module::order/view/info.phtml</argument>
</action>
</referenceBlock>
</body>
</page>
Add below code to your info.phtml to the section below billing address (DON'T REPLACE THE ENTIRE CONTENT).
app/code/Company/Module/view/adminhtml/templates/order/view/info.phtml
<?php echo $block->getOrder()->getGst();?>
Answered By - Nidheesh Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.