管理パネルの注文項目セクションにHTMLを追加する方法[重複]
-
29-09-2020 - |
質問
私はちょうどアイテムすべての後にアイテムIDを望んでいて、データベースからいくつかの情報を取得することができるが、常に最初の項目のIDを表示している これは私のXML
です<layout version="0.1.0">
<adminhtml_sales_order_view>
<reference name="order_item_extra_info">
<block type="core/template" name="cgorder_wrap_container" template="customsales/sales/cgorder_details_container.phtml">
<!-- Replace it with your OWN block -->
<block type="core/template" name="own_real_block" template="customsales/sales/cgorder_details.phtml" />
</block>
</reference>
</adminhtml_sales_order_view>
.
これは私の親テンプレートファイル
です<tr>
<td><?php echo $this->getChildHtml();?></td>
<td colspan="8"></td></tr>
.
これは私の子テンプレートファイル
です<?php
$id = $this->getParentBlock()->getParentBlock()->getItem()->getID();
echo "id is ".$id;
?>
.