Question

I am trying to add a block to the admin create order screen. Im my layout xml I have

    <adminhtml_sales_order_create_index>
    <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/fee/fee.js</name></action>
    </reference> 
    <reference name="data">
             <block type="fee/adminhtml_insuranceselector" after="shipping_method" name="fee.insurance" template="fee/sales/order/insuranceselector.phtml" />
    </reference>
</adminhtml_sales_order_create_index>

<adminhtml_sales_order_create_load_block_data>
    <reference name="data">
             <block type="fee/adminhtml_insuranceselector" after="shipping_method" name="fee.insurance" template="fee/sales/order/insuranceselector.phtml" />
    </reference>
</adminhtml_sales_order_create_load_block_data>

The block does not show up at all with reference of "data" or even "content", if I change the reference to say "left" it shows up but I really need it in the data area under the shipping method. The content reference doesn't have a template file so I don't see a need to echo a child block. Not sure what I am doing wrong. Any pointers would be appreciated.

Was it helpful?

Solution

The data block does not display all its children anonymously, you can check its template file (app/design/adminhtml/default/default/template/sales/order/create/data.phtml) to see how it's actually working.

To display your own block below the shipping methods, you will need to apply your own template, based on the original, to the data block, and to add a corresponding getChildHtml call where you want it to be displayed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top