Question

how to add custom text in layout page in magento ?

enter image description here

Was it helpful?

Solution

You can easily do this by translation feature of Magento.

  • Go to app/locale/<locale_folder>/Mage_Checkout.csv and write your translation like:

"text to translate", "translation of text"

  • Flush Magento cache and check frontend.

You can also do the same from app/design/frontend/<package>/<theme>/locale/<locale_name>/translate.csv file.

Note: For translation to work correctly, text to be translated should be enclosed within $this->__('text to be translated') in phtml file.

OTHER TIPS

Go to following file:

app/design/frontend/base/default/template/tax/checkout/shipping.phtml

OR

app/design/frontend/yourpackage/yourtheme/template/tax/checkout/shipping.phtml

Change following line:

<tr>
    <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>">
        <?php echo $this->escapeHtml($this->getTotal()->getTitle()) ?>
    </td>
    <td style="<?php echo $this->getStyle() ?>" class="a-right">
        <?php echo $this->helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?>
    </td>
</tr>

This code should be

<tr>
    <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>">
        <?php echo $this->__('Shipping') ?>
    </td>
    <td style="<?php echo $this->getStyle() ?>" class="a-right">
        <?php echo $this->helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?>
    </td>
</tr>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top