[英]Magento - Display payment fee on the order page (admin backend)
During the checkout process I can use the addTotal method on the address object to add a payment fee to be displayed for the user. 在结帐过程中,我可以在地址对象上使用addTotal方法添加要显示给用户的付款费用。
$address->addTotal(array
(
'code' => $this->getCode(),
'title' => Mage::helper('payment')->__('Invoice fee'),
'value' => $fee
));
Is there any equivilent on the order/invoice object in the administration backend? 管理后端中的订单/发票对象是否有任何对等物? If not, how can I display my payment fee on the order page (backend)? 如果没有,如何在订单页面(后端)上显示我的付款费用? I've got the payment fee in the sales_flat_order table. 我已经在sales_flat_order表中获得了付款费用。
In the backend you must provide some sort of block. 在后端,您必须提供某种阻止。
config.xml config.xml中
<config>
...
<adminhtml>
<layout>
<updates>
<YOUR_MODULE>
<file>YOURLAYOUT.xml</file>
</YOUR_MODULE>
</updates>
</layout>
</adminhtml>
</config>
design/adminhtml/default/default/layout/YOURLAYOUT.xml 设计/ adminhtml /默认/缺省/布局/ YOURLAYOUT.xml
<layout>
<adminhtml_sales_order_view>
<reference name="order_totals">
<block type="adminhtml/sales_order_totals_item" name="invoice_fee" template="YOUR/MODULE/total.phtml" />
</reference>
</adminhtml_sales_order_view>
</layout>
design/adminhtml/default/default/template/YOUR/MODULE/total.phtml 设计/ adminhtml /默认/缺省的/模板/你的/模块/ total.phtml
<tr>
<td class="label"><?php echo $this->__('Invoice Fee') ?></td>
<td class="emph"><?php echo $this->displayPriceAttribute('invoice_fee', true) ?></td>
</tr>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.