Invoice in two currencies?

Invoice in two currencies? How?

Modify template and compute currency differences and adjust price, then display each. Currency factors are available in the $currencies array and the current user currency is $smarty.const.SECONDARY_CURRENCY and store currency is in $smarty.const.PRIMARY_CURRENCY.

I am no coder but most likely this is wrong :)


[quote]{include file=“common_templates/price.tpl”

value=$order_info.total|$smarty.const.SECONDARY_CURRENCY}[/quote]



Problem sorted

Darius, where did that include come from? The value would fail.

[quote name='tbirnseth' timestamp='1321722152' post='126303']

Darius, where did that include come from? The value would fail.

[/quote]



Overall I needed a solution to print invoice in two languages and two currencies. Surly this can be achieved by using setting as showing currency in main and alternative currency but I wanted to print only one field in alternative currency in invoice.



So I created my_price.tpl in mail/common…


[quote]{strip}

{if $settings.General.alternative_currency == “Y” || $show_alt == 1}

{$value|format_price:$currencies.$primary_currency:$span_id:$class}{if $secondary_currency != $primary_currency} ({$value|format_price:$currencies.$secondary_currency:$span_id:$class:true}){/if}

{else}

{$value|format_price:$currencies.$primary_currency:$span_id:$class:true}

{/if}

{/strip}[/quote]



Cloned invoice.tpl to my_invoice.tpl in mail/orders

Modified line added

[quote]{include file=“common_templates/my_price.tpl” value=$order_info.total show_alt=1}[/quote]



Now admin panel order details page print invoice was modified to call for my_invoice.tpl