Forums / Templates, Stylesheets, Page Layout / What is the variable that represents the selected currency?

What is the variable that represents the selected currency?

Locked

Views: 1,302

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
6 Jul 2008, 12:38 PM
#1
cochlear avatar

cochlear

Zen Follower

Join Date:
Apr 2007
Location:
Sydney
Posts:
110
Plugin Contributions:
0

What is the variable that represents the selected currency?

I'm trying to display postage in customer's selected currency, in one of the define pages.

It's $15 Australian dollars flat rate, so if an European selects Euros in the currency side box, the postage should automatically change to 7.3 Euros.

Now I've worked out the code below would do the conversion, but it only shows the dollar number i.e. 7.3. How can I display the actual currency (€ or Euro)?

<?php $amount=15; echo $currencies->value($amount);?>
6 Jul 2008, 1:19 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: What is the variable that represents the selected currency?

try $currencies->format() instead of ->value()

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Jul 2008, 1:33 PM
#3
cochlear avatar

cochlear

Zen Follower

Join Date:
Apr 2007
Location:
Sydney
Posts:
110
Plugin Contributions:
0

Re: What is the variable that represents the selected currency?

Works beautifully!! Thank you DrByte! :clap: