Magento-获取在totals.html中按顺序使用的付款方式


Magento - Get Payment Method used in order in totals.phtml

我使用的是Magento 1.9.0.1,我想在totals.html 中获得使用过的订单付款方式

以下是我在totals.phtml:中的内容

<?php foreach ($this->getTotals() as $_code => $_total): ?>
    <?php if ($_total->getBlockName()): ?>
        <?php echo $this->getChildHtml($_total->getBlockName(), false); ?>
    <?php else:?>
    <tr class="<?php echo $_code?>">
        <td <?php echo $this->getLabelProperties()?>>
            <?php if ($_total->getStrong()):?>
            <strong><?php echo $this->escapeHtml($_total->getLabel());?></strong>
            <?php else:?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php endif?>
        </td>
        <td <?php echo $this->getValueProperties()?>>
            <?php if ($_total->getStrong()):?>
            <strong><?php echo $this->formatValue($_total) ?></strong>
            <?php else:?>
            <?php echo $this->formatValue($_total) ?>
            <?php endif?>
        </td>
    </tr>
    <?php endif?>
<?php endforeach?>

我想用<?PHP echo $PaymentMethod; ?> 这样的支付方式得到一个简单的回音

我如何获得订单使用的付款方式?

尝试使用以下代码:

<?php echo $this->getOrder()->getPayment()->getMethod(); ?>

它将返回所使用的付款方式的代码。