网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   ZenCart (https://www.0058.net/forumdisplay.php?f=69)
-   -   How to display different currency in product info? (https://www.0058.net/showthread.php?t=5824)

Kandiyohi 2016-08-13 08:11 PM

How to display different currency in product info?
 
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:
Code:

//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



All times are GMT +8. The time now is 01:19 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.