Question

I found this in totals.phtml file: $_total->getStrong()

What does it do?

totals.phtml file:

<?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 colspan="6" <?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?>
Was it helpful?

Solution

Please check these line in Mage_Sales_Block_Order_Totals:

https://github.com/OpenMage/magento-mirror/blob/magento-1.9/app/code/core/Mage/Sales/Block/Order/Totals.php#L137-L143

getStrong() is just a magic getter method and its used to display "Grand Total" as bold text.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top