VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: albert.arroyo on July 08, 2013, 12:32:24 PM

Title: Problem with multiple currencies
Post by: albert.arroyo on July 08, 2013, 12:32:24 PM
Hi,
with Joomla 2.5.11 and VM 2.0.20b.
I have a shop with multiple currencies (€ and $). € is default currency.
The process is:
- user login
- user change the default currency € -> $ with default module VM - CURRENCIES SELECTOR. The products change correctly the amounts.
- user make an order. The frontend order is correct. The user has all the time the amount with his currency (and Vm noticed in the final checkout the total amount in default currency, in this case, €).
- in backend the order is saved in € (for me correct).

The problems comes now:
- the user email confirmation, the total amount is calculated in €, but the currency that is shown is $  (conflict with user, that in frontend have seen total amount in $ and the email order confirmation see a different amount).
- the VM email confirmation for the admin, the same problem.
Example for more comprehension:
1€ -> 2$
User Order: 10$
Saved in backend Order: 5€
Email user confirmation: 5$ -> Error
Email VM admin confirmation: 5$ -> Error

I think the correct process will be:
- Email user confirmation: 10$ -> notification with the currency that he made all the VM process
- Email VM admin confirmation: 5€ -> always the default currency

In database, table virtuemart_orders:
order_currency, user_currency_id allways set with default currency. In the process checkout, and user register, I've never seen the option to set the currency or something like that.

What could be the solution for this? Some override to solve it? If there are the fields in the tables, it's possible to control the values? This change could affect in other places?

Thanks!
Title: Re: Problem with multiple currencies
Post by: Milbo on July 08, 2013, 14:55:19 PM
Please test vm2.0.21 latest. Today should come 2.0.22 officially.
Title: Re: Problem with multiple currencies
Post by: albert.arroyo on July 09, 2013, 16:01:37 PM
Hi,
it's still 2.0.21 (Test versions).
This bug is solved in new version?
Thanks for reply!
Title: Re: Problem with multiple currencies
Post by: albert.arroyo on July 10, 2013, 12:15:47 PM
I'm just updated to VM 2.0.22 and not solved yet.

When I change the currency and make and order, the amount it's not with the selected currency in the email user order confirmation (allways with default currency).
This is for some reason?
I have the shop with default currency in €.
It's quite confuse for the user, that make an order with $, and receive a confirmation email with total amount in €.

How could override this?
In table virtuemart_orders there are: order_currency and user_currency_id, what's the utility of this if allways contains the default currency value? Is possible to control the selected currency and when the user make an order change change this values for the selected currency, and after that, for the email order confirmation show the amounts with this currency?

Thanks!
Title: Re: Problem with multiple currencies
Post by: Milbo on July 10, 2013, 12:46:45 PM
you have a shop currency, a payment currency and a user currency. You should be sure not to use any overrides.
Title: Re: Problem with multiple currencies
Post by: albert.arroyo on July 10, 2013, 13:01:11 PM
No, I'm use a default VM and a default template with no overrides.
I'm just testing the flux of VM to make and order with another currency that is not the default
Title: Re: Problem with multiple currencies
Post by: alatak on July 10, 2013, 13:05:57 PM
Hello
Quoteyou have a shop currency, a payment currency and a user currency. You should be sure not to use any overrides.
and an email currency

The shop currency is the one defined in your shop
The user currency is the one selected by a user via the Currency module

You can create a payment method, and tell that this payment method will do the transaction in another currency
and also tell in which currency the email will be sent (the vendor currency= the one defined in your shop) or the payment currency
Title: Re: Problem with multiple currencies
Post by: peete on July 12, 2013, 17:10:19 PM
I have the same situation. Please somebody tell us the solution.
Joomla 2.5.11 VM 2.0.20b
Title: Re: Problem with multiple currencies
Post by: franzpeter on July 16, 2013, 19:00:49 PM
What did you set for tax rate in the payment and shipping plugins. If you did set 'Default Rules', switch it to something else and try if that things still occur.
Title: Re: Problem with multiple currencies
Post by: Evelina1 on July 17, 2013, 12:18:19 PM
e-mail arrives with the symbol of the selected currency, but the price is in the currency vendor

order(image 1)
(http://2i.cz/2i/i/51e67cd0/1c14cb86646db0069646a4e6533ab333/d3be1c36e5.f.jpg)

e-mail (image2)
(http://2i.cz/2i/i/51e67cae/63a19ec13a53804981274f1ffe3f758d/86eb4963b0.f.jpg)

bug vm 2.0.18 - vm 2.0.22
in the VM 2.0.12f  it's okay
Title: Re: Problem with multiple currencies
Post by: peete on July 18, 2013, 14:17:28 PM
Dear Evelina1

Firstly thank you to suggestion VM 2.012f it works fine. The amil what the system send perfect. But the admin site? I don't know what is the good currency and price. How can i set the admin site. I want to use Euro and Hungarian Forint and I can see forint on the admin site always. Please help me.
Title: Re: Problem with multiple currencies
Post by: AntiCZ on July 30, 2013, 13:23:19 PM
It is template issue.  Bug if you call function $this->currency->priceDisplay() in invoice templates

change echo $this->currency->priceDisplay(  $item->product_subtotal_with_tax ,$this->currency);

on echo $this->currency->priceDisplay(  $item->product_subtotal_with_tax ,0);

This is example there are a lot of places where code must be fixed.
Title: Re: Problem with multiple currencies
Post by: EAltea on July 30, 2013, 14:03:52 PM
Hello friends, I have aprox the same problem but in emails and the most big bugs I have it in the payment sistem with PayPal:
in the shop I can see the currencies (€ & $) correctly but if I go to pay in PayPal with $, the VM is revert the prices to the vendor currency (€) It's imposible to make the payment in € if I choose € or in $ if I choose $ in the payment process.
I use J2.5, VM2 and PayPalXpress. Multicurrency site and multi languge.
Somebody can help me with this bug, please?
thanks for now
Title: Re: Problem with multiple currencies
Post by: jjk on July 30, 2013, 17:52:19 PM
Perhaps this reply by Alatak helps: http://forum.virtuemart.net/index.php?topic=112268.msg380339#msg380339