PDA

View Full Version : How to display different currency in product info?


Kandiyohi
2016-08-13, 08:11 PM
Hey,

is it possible to show different currencies in product info ???

base currency is AUD but I want to show my customers the product price in
USD GBP. The standard for the order should be AUD I only want to the other currencies. Is something like that possible???

Thanks

Karly
2016-08-13, 08:12 PM
Code for AUD is here:

Takes currency values from database, just change the query to make dollars e.t.c.

Add In /public_html/includes/templates/yourtemplate/templates/tpl_product_info_display.php

After line 72:

//au currency

$currencies_query_db = "select *
from " . TABLE_CURRENCIES . " where title = 'Euro'";
$rate = $db->Execute($currencies_query_db);
$rates = $rate->fields['value'];
$spacer = '<br/>';
echo $spacer;
$value = zen_get_products_display_price((int)$_GET['products_id']);
list($curency, $amount) = split(';', $value);
$amount = $amount*$rates;
$amount= number_format($amount, 2, '.', '');
echo '&euro;'.$amount;

//end of au currency