Reputation: 101
<layout>
<adminhtml_sales_order_view>
<reference name="order_tab_info">
<block type="booking/sales_order_view_reservationbooking" name="reservationbooking" template="booking/sales/order/view/reservationbooking.phtml" />
</reference>
</adminhtml_sales_order_view>
<?php
class Actino_Booking_Block_Adminhtml_Sales_Order_View_Reservationbooking extends Mage_Core_Block_Template {
}
In core adminhtml i edited the sales/order/view/info.phtml.. I know that Never edit the core files, but this is only for test for which i want to display my template around the orders view. and then if this works I should have to create or rewrite the info.phtml.
and in info.phtml i write a code to view this layout
<?php echo $this->getChildHtml('reservationbooking');?>
This is not working. I cant see the text "reservation booking data" in sales order view. without modifying any core files ? My question is how to add custom field in sales order view ?
Upvotes: 0
Views: 3426
Reputation: 2594
Once a try
<adminhtml_sales_order_view>
<reference name="order_info">
<action method="setTemplate">
<template>yourmodule/sales/order/view/reservationbooking.phtml</template>
</action>
</reference>
</adminhtml_sales_order_view>
Create a file in the following
app/design/adminhtml/default/default/template/yourmodule/sales/order/view/reservationbooking.phtml
Now you can add your stuff to the reservationbooking.phtml
inside your module, without change the core files
Upvotes: 0