How to add content after or before a block using XML in magento

I want to add content to a block using an XML file. Please check below image

enter image description here

I have added the code below, but this is rewriting the content. (I want to add).

<reference name="order_items">
      <action method="addColumnRender">
         <column>name</column>
         <block>adminhtml/sales_items_column_name</block>
         <template>sales/items/column/name.phtml</template>
      </action> 
</reference> 

I checked the kernel file by creating a block programmatically.

+4
source share
1 answer

As I know, you can try this way:

<adminhtml_sales_order_view>
<reference name="order_items">
    <block type="core/template" name="test-1" template="test/template.phtml" after="sales_order_edit"/>
    <block type="core/template" name="test-2" template="test/template.phtml" before="sales_order_edit"/>
</reference>

Or in the template file, you can place your block wherever you want:

app\design\adminhtml\default\default\template\sales\order\view\tab\info.phtml
+3
source

Source: https://habr.com/ru/post/1665959/


All Articles