News:

Looking for documentation? Take a look on our wiki

Main Menu

Show multiple (dual) currency on product details.

Started by fallnet, November 09, 2015, 13:12:02 PM

Previous topic - Next topic

fallnet

Hello,

Im looking for solution, where I can show two currency on product details.
For example my main currency is EUR and I want show GBP also, something like:

Price: 10 EUR (7.14 GBP)

Dont you have somebody some finished code or plugin which make this, please?
Convert rate should be taken from convertECB.php
I was find here in forum solution for old VM 1. But nothing for Virtuemart 3.x.

Thank you.
Best Regards
fallnet

fallnet

Hello,

I was find solution, but with rounded.
My currency is rounded to cdecimal place 0, but I want 2nd currency rounded on 2 decimal place.
I mean show EUR: 22,90 instead of EUR: 23

echo '<b>EUR: '.$this->currency->roundForDisplay($this->product->prices['salesPrice'],47,1,false).'</b>';

Dont you have idea how to change this code to 2 decimal place after , ?
In currency administration is correct 2

Regards
fallnet

Milbo

roundForDisplay($price, $currencyId=0,$quantity = 1.0,$inToShopCurrency = false,$nb= -1){

=> $this->currency->roundForDisplay($this->product->prices['salesPrice'],47,1,false,2)

Else it takes it from the currency object.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

aka.deton

Quote from: Milbo on November 10, 2015, 14:07:51 PM
roundForDisplay($price, $currencyId=0,$quantity = 1.0,$inToShopCurrency = false,$nb= -1){

=> $this->currency->roundForDisplay($this->product->prices['salesPrice'],47,1,false,2)

Else it takes it from the currency object.
Does not work in version 3.0.18!

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum