Magento 后台创建新订单,支付模块的设计

选择支付部分界面

根据上面的截图 ,我们发现支付部分的代码是

<div id="order-methods">
            <div id="order-billing_method" class="box-left payments"><?php echo $this->getChildHtml('billing_method') ?></div>
           。。。。。。
        </div>

在这个文件:D:\www\lollicupStore2\app\design\adminhtml\default\default\layout\amasty\amstcred\amstcred.xml 对原来的代码进行了重写

 <adminhtml_sales_order_create_index>
        <reference name="billing_method">
            <block type="amstcred/adminhtml_sales_order_create_payment" template="amasty/amstcred/sales/order/create/payment.phtml" name="reward_points" before="-" />
        </reference>
    </adminhtml_sales_order_create_index>

    <adminhtml_sales_order_create_load_block_billing_method>
        <reference name="billing_method">
            <block type="amstcred/adminhtml_sales_order_create_payment" template="amasty/amstcred/sales/order/create/payment.phtml" name="reward_points" before="-" />
        </reference>
    </adminhtml_sales_order_create_load_block_billing_method>

    <adminhtml_sales_order_create_load_block_data>
        <reference name="billing_method">
            <block type="amstcred/adminhtml_sales_order_create_payment" template="amasty/amstcred/sales/order/create/payment.phtml" name="reward_points" before="-" />
        </reference>
    </adminhtml_sales_order_create_load_block_data>

我们需要找到重写着部分代码的block以及模板文件 。

amstcred/adminhtml_sales_order_create_payment
amasty/amstcred/sales/order/create/payment.phtml

block: amstcred/adminhtml_sales_order_create_payment 其实是文件

D:\www\lollicupStore2\app\code\local\Amasty\StoreCredit\Block\Adminhtml\Sales\Order\Create\Payment.php

至于原因,仔细看config.xml文件 D:\www\lollicupStore2\app\code\local\Amasty\StoreCredit\etc\config.xml

Leave a comment

您的邮箱地址不会被公开。 必填项已用 * 标注