VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Rune Rasmussen on April 22, 2015, 14:14:21 PM

Title: Currency Details - Code 2 letters
Post by: Rune Rasmussen on April 22, 2015, 14:14:21 PM
In later versions of VirtueMart there has been added a new field in "Currency Details", named "Code 2 letters".

This field is empty for all as fare as I can see, but it's REQURED to fill if you want to do any changes and save.

But what is this actually, and why is it required?

I have never seen used. or heard about, anything else than a 3 letter code (ISO 4217)...?

Not even Wikipedia refer to anything else than the 3 letter ISO 4217 code:
http://en.wikipedia.org/wiki/United_States_dollar
http://en.wikipedia.org/wiki/Euro
http://en.wikipedia.org/wiki/Norwegian_krone

???
Title: Re: Currency Details - Code 2 letters
Post by: Studio 42 on April 22, 2015, 21:23:43 PM
Hi,
If this is a blocker, then simply use the same that 3 letter code and remove the last letter.
Title: Re: Currency Details - Code 2 letters
Post by: Milbo on April 23, 2015, 00:43:48 AM
Good answer st42,

Quote from: Rune Rasmussen on April 22, 2015, 14:14:21 PM
but it's REQURED

yeh I should remove that.
Title: Re: Currency Details - Code 2 letters
Post by: Rune Rasmussen on April 23, 2015, 08:49:21 AM
Yes, I did actually use the country code for it.

But what I wonder is what this actually is? What's the idea behind it, what is it used for? What ISO standard is it based on? :)
Title: Re: Currency Details - Code 2 letters
Post by: Milbo on April 23, 2015, 10:39:24 AM
It is just the analogy to the countries.

The idea is that if people use the country_2 code, that they can directly read the corresponding currency. Integrated xref.
Title: Re: Currency Details - Code 2 letters
Post by: Rune Rasmussen on April 23, 2015, 10:52:14 AM
OK, so it's based on the  "ISO 3166 two letter country code". And then the text for that field should probably be "Country Code 2 letters" instead - to avoid confusion...?
Title: Re: Currency Details - Code 2 letters
Post by: Studio 42 on April 23, 2015, 16:12:32 PM
I think is based on what you need.
Some web service for eg. service  as perhaps google product, facebook or perhaps another site only use 2 letter code, if you need to set manually the 2 letter code for you needs then simply change this, i don't think this follow iso 3166
Title: Re: Currency Details - Code 2 letters
Post by: Rune Rasmussen on April 23, 2015, 21:17:27 PM
Huh ...? Tell me anyone using a two letter currency code... It's just a confusing abnormality in VM it seems. :)
Anyhow  the country_2 code should always be ISO 3166.
Title: Re: Currency Details - Code 2 letters
Post by: Rune Rasmussen on April 24, 2015, 13:58:51 PM
Wrong line: http://dev.virtuemart.net/projects/virtuemart/repository/revisions/8838/diff/trunk/virtuemart/administrator/components/com_virtuemart/views/currency/tmpl/edit.php ? ;)
Title: Re: Currency Details - Code 2 letters
Post by: Studio 42 on April 24, 2015, 16:14:07 PM
How work currency code,
extracted from a page:
QuoteCurrency codes are composed of a country's two-character Internet country code plus a third character denoting the currency unit. For example, the Canadian Dollar code (CAD) is made up of Canada's Internet code ("CA") plus a currency designator ("D"). For a list of currency symbols like the dollar sign "$", the Pound sign "£", and the Euro sign "€", refer to our Currency Symbols page.

this mean remonving the last letter is always right.
Title: Re: Currency Details - Code 2 letters
Post by: Rune Rasmussen on April 24, 2015, 18:00:23 PM
Always right for what? Btw! If it was always right, the setting wouldn't be needed as it could have been done automatically by the system.

Anyhow the  two-character Internet country code should always be ISO 3166, and there is no such thing as a two-character currency code. ;)
Title: Re: Currency Details - Code 2 letters
Post by: Studio 42 on April 24, 2015, 18:43:10 PM
Rune Rasmussen, i don't know why this was added ?
Certainly a paid member, because i don't have any idea why this is in the currency table.
Title: Re: Currency Details - Code 2 letters
Post by: Milbo on April 24, 2015, 20:29:20 PM
Rune it is just the country_2 code of the currency, or remove the last char
Title: Re: Currency Details - Code 2 letters
Post by: Rune Rasmussen on April 26, 2015, 20:30:41 PM
That's fine Max, but this is just not about me or what I should/can do with it.

I have proposed that you change the naming of the field, and I now also propose that you clarify in the help text for the field, add something about what it is - and what purpose it has.

Btw! Did you notice that you changed the wrong line, removed requirement for 3 character currency code, instead of removing it for the 2 character "thing"?

Quote from: Rune Rasmussen on April 24, 2015, 13:58:51 PM
Wrong line: http://dev.virtuemart.net/projects/virtuemart/repository/revisions/8838/diff/trunk/virtuemart/administrator/components/com_virtuemart/views/currency/tmpl/edit.php (http://dev.virtuemart.net/projects/virtuemart/repository/revisions/8838/diff/trunk/virtuemart/administrator/components/com_virtuemart/views/currency/tmpl/edit.php) ? ;)