View Single Post
  #2  
Old 05-04-2005, 08:18 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default

Hi,

I think I have a solution for this...

The piece of code needed is common throughout the system, I don't know why it is not used in here. All you need to do is copy it to the parts on the invoice you need and change it slightly.

OK, start by opening a template with prices and their converted rate on, e.g.

cart_totals.tpl

you will see this piece of code... (which means you don't actually need to do that bit, but I include it for reference)

{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$order.display_subtotal}

or something similar, as you are going to have to look carefully at the last bit, ie =$order.display_subtotal} each time you apply it.

Right, the file you need to alter is in:
mail/html/order_data.tpl

In here you will see many instances of:

{include file="currency.tpl" value=$gc.amount}

each one of these is an instance of displaying a price in the invoice, ie product prices, sub totals, shipping charges and total, etc.

So basically you need to add the new bit of code, right after each instance of the currency.tpl where you want to display 2 currencies.

The important thing is to make the end bit of code match.

So if you want to do the order total, you need to make sure both bits are the same...

{include file="currency.tpl" value=$order.total}{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$order.total}

The next step is to alter the invoice table structure to allow these extra values to fit on the page.

Hope this helps.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote