Magento - 获取在 totals.phtml 中按顺序使用的付款方式
Magento - Get Payment Method used in order in totals.phtml
我正在使用 Magento 1.9.0.1,我想在 totals.phtml
中获取使用过的订单付款方式
这是我的内容: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(); ?>
它将return使用的付款方式的代码。
我正在使用 Magento 1.9.0.1,我想在 totals.phtml
中获取使用过的订单付款方式这是我的内容: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(); ?>
它将return使用的付款方式的代码。