简体   繁体   English

Magento-在订单页面上显示付款费用(管理员后端)

[英]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.

相关问题 Magento 2在管理发票中增加额外费用 - Magento 2 add extra fee into admin invoice 编辑Magento管理员和用户订单详细信息页面 - Editing Magento Admin and User order detail page Magento订单无法在一页结帐中重定向到支付网关 - Magento order not redirect to payment gateway in one page checkout Magento PayPal付款缺少运费…但仅在某些情况下 - Magento PayPal Payment missing Shipping Fee…but only sometimes Magento:Performanceant在产品详细信息页面上显示可用的运输和付款方式 - Magento: Performant display available shipping and payment methods on product detail page 应该启用Magento付款方式,但不显示在前端(结帐页面)中吗? - Magento Payment method is should be enable but its not display in Frontend(checkout page)? 在后端的Magento Order View页面中添加产品的缩略图 - Adding thumbnail image of product in Magento Order View Page in Backend Magento-从管理员订单页面添加/删除功能的正确方法? - Magento - The proper way to add/remove features from admin order page? Magento:以与admin后端树结构相同的顺序显示子子类别 - Magento : showing sub sub categories in same order as in admin backend tree structure Magento - 在admin中显示每个设计的产品和类别正文页面 - Magento - Display product and category body page for each design in admin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM