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

ce-1.9.0.1paymentpayment-methods

i'm using Magento 1.9.0.1 and i want to get the used order payment method in the totals.phtml

Here is what i have in: 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?>

I want to get a simple echo with the the payment method like <?PHP echo $PaymentMethod; ?>

How can i get the payment method used for the order ?

Best Answer

//get quote
$quote = Mage::getSingleton('checkout/session')->getQuote();

//get payment from quote
$quote->getPayment()
Related Topic