1

I want to display currency code which was used for payment in invoice template. Currency code like CAD, USD . I have not found any directive for this. Please help me.

  • 1
    In invoice pdf or emai template. It's better to attach screenshot – saravanavelu May 26 '15 at 6:17
  • In invoice email template. – Chandresh May 26 '15 at 7:53
1

Copy the code to local folder from Mage/Sales/Model/Order/Invoice.php and after that add the given function...

public function getOrderCurrency()
{
    $currency = $this->getOrder()->getOrderCurrencyCode();
    $text = Mage::helper('core')->__('Order was placed using %s',$currency);
    return $text;
}

In the invoice email template, For Currency Code use

{{var invoice.getOrderCurrency()}}
1

You can rewrite or copy the code from Mage/Sales/Model/Order/Invoice.php to local folder and add the below function

public function getOrderCurrency()
    {
        $currency = $this->getOrder()->getOrderCurrencyCode();
        $text = Mage::helper('core')->__('Order was placed using %s',$currency);
        return $text;
    }

In invoice email template,after {{var payment_html}} get the order currency as {{var invoice.getOrderCurrency()}}. Like this you can add any number of functions and access in email templates.

0

Have you tried this:-

 $storeid = 1; /* change store id according to yours*/
 $currencyCode =  Mage::app()->getStore($storeId)->getCurrentCurrencyCode(); 

$currencySymbol = Mage::app()->getLocale()->currency($currencyCode)->getSymbol(); 

For Editing in invoice you have to modify these file and obviously overwirte them in local pool not in core file

/app/core/Mage/Sales/Model/Order/Pdf/Invoice.php

/app/core/Mage/Sales/Model/Order/Pdf/Abstract.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.