在结帐时安排付款选项

时间:2012-04-13 04:32:39

标签: php magento

我正在尝试编辑

中magento中付款方式的布局

路径: - ** / template / checkout / onepage / payment / methods.phtml

<dl class="sp-methods" id="checkout-payment-method-load">
<?php foreach ($this->getMethods() as $_method): $_code = $_method->getCode(); ?>
    <dt class="p_method">
    <?php if( sizeof($this->getMethods()) > 1 ): ?>
        <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
    <?php else: ?>
        <span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
    <?php endif; ?>
        <label for="p_method_<?php echo $_code ?>"><?php echo $this->getMethodTitle($_method) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
    </dt>
    <?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
    <dd>
        <?php echo $html; ?>
    </dd>
    <?php endif; ?>
<?php endforeach; ?>
</dl>

如何更改getMethods()数组中的顺序?

1 个答案:

答案 0 :(得分:2)

您可以直接从admin设置付款方式的顺序,其中每种付款方式都有您可以设置的订单字段

system > configuration > sales > payment methos