Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to print secondary currency on the invoice

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-02-2005, 10:11 AM
 
steen maigaard steen maigaard is offline
 

Member
  
Join Date: Sep 2004
Posts: 24
 

Default How to print secondary currency on the invoice

Hi.

Our customers pay sometimes directly to the bank, sometimes through paypal. We have to use Euro as the primary currency, and Danish Kroner as the secondary. This is ok for paypal users, but when you pay directly to our bank, you can only se the primary currency on the invoice. We need to be able to display the secondary Total amount on the invoice too. How is this possible??.

Using 4.12

Regards
Steen Maigaard
__________________
Using X-Cart 4.0
Reply With Quote
  #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
  #3  
Old 05-06-2005, 12:02 PM
 
steen maigaard steen maigaard is offline
 

Member
  
Join Date: Sep 2004
Posts: 24
 

Default

Hi paul, i'll give this a try, thanks for the help

Chers
Steen
__________________
Using X-Cart 4.0
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:45 PM.

   

 
X-Cart forums © 2001-2020