What is $_total->getStrong()
-
11-01-2021 - |
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?>
Solution
Please check these line in Mage_Sales_Block_Order_Totals
:
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