嗨, 我正在写一个Magento模块。为此,我想在模块的处理程序中调用一个核心块。我不想修改或扩展核心块。我只是想在我的布局处理程序中调用它。有什么建议么?Magento:呼叫我的模块内的核心块
我想插入位于
adminhtml/sales/order/view/history.php
以下处理程序块是包含上述Histrory.php阻止
<adminhtml_sales_order_addcomment>
<block type="adminhtml/sales_order_view_history" name="order_history" template="sales/order/view/history.phtml" output="toHtml"/>
</adminhtml_sales_order_addcomment>
的sales.xml这是我的layout.xml
<orderadmin_adminhtml_orderadmin_search>
<update handle="orderadmin_orderadmin_search" />
<reference name="content">
<!-- I want to insert the following block -->
<block type="adminhtml/sales_order_view_history" name="order_history" template="sales/order/view/history.phtml" output="toHtml"/>
</reference>
</orderadmin_adminhtml_orderadmin_search>
但它会导致以下错误。
致命错误:调用一个成员函数的getId()在\应用\代码\芯的非对象上\法师\ Adminhtml \块\ SALES \订单\视图\ History.php上线79
你打电话是什么意思?你可以通过' ' –
2013-03-04 10:21:51
是的。我想在layout中插入我的处理程序中的核心块 – Sukeshini 2013-03-04 11:11:26
是的,就这样做。如果你都做到了,显示代码,如果它不能正常工作 – 2013-03-04 11:13:12