WackGet
WackGet

Reputation: 2926

Order confirmation email {{payment_html}} block

I'm trying to edit some of Magento's transactional emails (the order confirmation ones). My aim is to change the order of the order totals so that "Tax" comes before "Subtotal" (our subtotal already includes tax). I've found that the totals are generated in app\design\frontend\base\default\template\sales\order\totals.phtml via this loop.

There is a condition which states:

<?php if ($_total->getStrong()):?>
    <strong><?php echo $_total->getLabel()?></strong>
<?php else:?>
    <?php echo $_total->getLabel()?>
<?php endif?>

My main questions are:

  1. What is ->getStrong() doing, and where is it defined, because I can't find it anywhere even after using grep to search the codebase.
  2. Are the labels (such as "Subtotal", "Tax", "Grand Total", etc.) stored anywhere in Magento's back end?
  3. Any ideas on how I'd go about changing the order of the fields?

Thanks!

Upvotes: 0

Views: 2044

Answers (1)

MagePal Extensions
MagePal Extensions

Reputation: 17656

Take a look @

1) Take a look /app/code/core/Mage/Sales/Block/Order/Totals.php

$this->_totals['grand_total'] = new Varien_Object(array(
    ..
    'strong'=> true,
    'value' => $source->getGrandTotal(),
    'label' => $this->__('Grand Total')
));

2) app/locale/en_US/Mage_Sales.csv

see http://www.magentocommerce.com/boards/viewthread/29444/

3) Admin -> System -> Config -> Sales -> Sales -> Checkout Totals Sort Order

Upvotes: 2

Related Questions