문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top