Dual currency and price display per product
schnicel:
Hi,
I have similar problem like some of you, but it`s little bit specific.
Our country is going to change currency(SKK->EUR), and by the law all stores must have prices in dual currencies of goods for some time.
We will have fixed change rate, and I need to display price in dual currencies.
Can somebody give mi a tip for a modul, component or some configuration trick?
Marian
schnicel:
Hi all,
if somebody have the same problem to display price in dual currencies a make the following change in php code
inspired by djlongy http://forum.virtuemart.net/index.php?topic=15464. Instead of djlongy, Im using the VM ver. 1.1.0 beta3, so the changes I do take place in another file /components/com_virtuemart/themes/default/templates/common/price.tpl :
on line 26 I change the code :
<?php echo $CURRENCY_DISPLAY->getFullValue($base_price) ?>
with
<?php
$eur_product_price = number_format( strip_tags($base_price) / 32.46,2,",",".");
echo $CURRENCY_DISPLAY->getFullValue($base_price)."<br />".$eur_product_price." EUR";
?>
da8iwr:
This is great thank you. I have just added another string to it, so i can show
GBP, EUR and USD at the same time, the only problem is it works on a specified exchange rate, not the current rate
<span class="productPrice">
<?php
$eur_product_price = number_format( strip_tags($base_price) / 0.79,2,",",".");
$usd_product_price = number_format( strip_tags($base_price) / 0.58,2,".",".");
echo $CURRENCY_DISPLAY->getFullValue($base_price)." €".$eur_product_price.""." $".$usd_product_price.""; ?>
<?php echo $text_including_tax ?>
</span>
The part i coloured in red is the exchange rates, well they are a multiplier that just multiplies the base currency (the currency chosen in the admin).
Does anybody know of a way to draw in the current rates from somewhere else in the site such as the currency module or part of the site so it will always be upto date?
Many thanks for the help above though :)
Ian
JonathanNZ:
Hi folks,
Is there anyway to use code (by adjusting the mods you have made) to call up the exchange rate based price when displaying multiple currencies?
What would also be good is to be able to use code to call up the currency that product is actually set up in. So let us say the store is set to US$ as default, and the product is set to CA$, then it will display the US$ price and the CA$ one. The US one will undergo a currency conversion, and the CA$ price would be fixed to what it was set to in the product in question.
I am hunting for a way to do something like that. Your data above is the closest I've come to finding a solution...
Jonathan
dlux:
Is it possible to apply this coding to VM 1.1.3 also?
Navigation
[0] Message Index
[#] Next page