VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Products, Prices, Tax and Categories VM 1.1 => Topic started by: chunket on July 15, 2009, 09:28:11 am

Title: Manually Set Currency Rate or Fix Currency Rate
Post by: chunket on July 15, 2009, 09:28:11 am
Hi all,

How do i manually set a currency to particular rate? For example 1 MYD = 3.8 USD. If user change currency to USD, all products must use this flat rate. Is there a solution for this or plugin module for this solution?

Thank you.
chunket
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: steven on August 10, 2009, 05:35:33 am
Yes, please show me as well. I was not able to fix the currency rate. Let me know if anyone know.

cheers,
steven. :o
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: Panikos on August 10, 2009, 18:26:17 pm
Yes, please show me as well. I was not able to fix the currency rate. Let me know if anyone know.

cheers,
steven. :o

/cache/daily.xml is the file you want to change.
Edit it with the currency rates you want. Then:
chown root:root daily.xml
chmod 0644 daily.xml
The above two lines change the ownership of daily.xml to root and read/write for root only and read for everybody else. You have to change the ownership to root otherwise your changes will get overwritten by the exchange module.
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: henry_yacob on September 19, 2009, 17:46:04 pm
/cache/daily.xml is the file you want to change.
Edit it with the currency rates you want. Then:
chown root:root daily.xml
chmod 0644 daily.xml
The above two lines change the ownership of daily.xml to root and read/write for root only and read for everybody else. You have to change the ownership to root otherwise your changes will get overwritten by the exchange module.
Wow..nice solution..
But I still confuse with the 'two lines'..
Can you explain about it more detail??how to change it??

Thanx a lot...
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: azkrishna on November 02, 2009, 22:25:40 pm
hi, I dont кnow where in file daily.xml , put this 2 files
chown root:root daily.xml
chmod 0644 daily.xml

and I dont know how.

many thanks for help
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: CovLee on January 20, 2010, 13:00:55 pm
Do you mean i should put this two lines on dialy xml?
chown root:root daily.xml
chmod 0644 daily.xml

If so, at what line should i put this line? (before/after what line)

Thanks
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: jenkinhill on January 21, 2010, 08:58:17 am
chown root:root daily.xml
chmod 0644 daily.xml

You run them on your server. You usually need root access to chown.
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: CovLee on February 03, 2010, 12:18:15 pm
chown root:root daily.xml
chmod 0644 daily.xml


You run them on your server. You usually need root access to chown.


Still don't get it :( how to run them on the server..
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: jenkinhill on February 04, 2010, 08:58:01 am
You can chmod the server files using ftp. You need root access to the server to chown, so if you don't have root access then get your host to do this & set up a cron - they can include chmod as well in a cron job.

If you don't understand the terms then use Google.
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: CovLee on February 04, 2010, 12:48:41 pm
You can chmod the server files using ftp. You need root access to the server to chown, so if you don't have root access then get your host to do this & set up a cron - they can include chmod as well in a cron job.

If you don't understand the terms then use Google.

Thank you, i have contacted my host support to CHOWN and now it (seems to) works :)
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: Spellscape on February 19, 2010, 00:19:50 am
This works if mu base currency is Euro
But if I have for example 4 products -
2 of them in Euro
2 in USD - and all my prices converted to Ukrainian Hryvnas
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: xxsuna on June 01, 2010, 15:40:54 pm
make your curencies all in one. I had same problem half prices uploaded in EUR half in CZK il make all in EUR. If you do not do thad your "base" currency will be different. When you change rate, this "base" newer change.

                                   ---
I want ask ... if i change chmod to 444 (reading only) ? it make diference?
will i still need to change ownership to root?
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: jenkinhill on June 01, 2010, 17:49:37 pm
I want ask ... if i change chmod to 444 (reading only) ? it make diference?
will i still need to change ownership to root?

Depends on the server. You can try just 444 and see what happens.
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: Comprensivo on July 28, 2011, 00:26:52 am
Do i understand this correctly, Euro is the standard currency and everything is calculated from this currency?
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: jenkinhill on July 28, 2011, 12:21:33 pm
No. The standard shop currency is that of the country selected in the store information. So in in the UK the GBP will be the standard currency and conversions will be based on that.
Title: Re: Manually Set Currency Rate or Fix Currency Rate
Post by: gio on September 29, 2011, 16:51:26 pm
Hi all,
I have the same problem: I want to manually set the currency rates. So I modified the file in cache/daily.xml setting the desired fixed rates.
Everything seems to be ok until 2 P.M. - 3 P.M. when I supposed is executed an upgrade in the Central Bank.
(In site http://www.ecb.europa.eu/stats/exchange/eurofxref/html/index.en.html you can read:
"The reference rates are usually updated by 3 p.m. C.E.T. They are based on a regular daily concertation procedure between central banks across Europe and worldwide, which normally takes place at 2.15 p.m. CET.").
After this time the file is not changed but it seems that the file is no more read because in virtuemart I find the actual current rate and not the desired fixed rates.

I ask to service provided for changing file's owner but the answer was that it is not possible. The owner of the file remains the ftp owner.
So the only thing that I can do is to change the permission to r--r--r-- for the ftp owner.
But in this way it doesn't work (i.e. it works until 2 P.M. - 3 P.M. and not more: if I want that it works again, I need to load again the file cache/daily.xml).
Someone has any idea ?

Thanks in advance