hi guys, in germany we use comma instead of dot as separation mark for decimal numbers, so is it possible to provide the option to use comma, when enabling decimal numbers for any given product type?
thx in advance
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | comma_instead_of_dot-1787182-6.patch | 2.27 KB | guy_schneerson |
Comments
Comment #1
guy_schneerson commentedHi @ciniko
Thanks for bringing this up, will look into it.
Do you know if their are any Drupal configuration related to number formats anywhere on a Drupal site?
Comment #2
guy_schneerson commentedAny ideas?
We can create configuration options for all known number formats see http://en.wikipedia.org/wiki/Decimal_separator or look at the module http://drupal.org/project/format_number
We can also add validation to the forms to make sure it is entered in the correct way and possibly convert it to a format that commerce can handle before its submitted.
What about the line item Quantity formatter?
Comment #3
jasminedb commentedHello,
May I ask if you have found a way to solve this problem? it's rather confusing for the customer to have to enter quantities with decimal dots and to see the prices with decimal commas.
For the moment I did state clearly how they should enter the quantities, but many surfers don't really read what's on a page....
Comment #4
guy_schneerson commentedHi jasminedb
Sorry I haven't got around to this, will try and have this resolved in the next few weeks.
Comment #5
iaugur commentedThis is a common issue when dealing with decimal validation on international sites.
The following issues have addressed this and may be relevant here (I haven't looked into them in any depth)
Drupal Commerce
#1450736: Support for currency decimal separator as decimal delimiter for field input - see Googletorps comment/patch at #4
Webform
#1813200: Validation of field type number fails for decimal separator - see sidharthap comment - also #4 ; p
Comment #6
guy_schneerson commentedAttached is a patch that uses the format_number module.
If the format_number is enabled all quantity edit fields will use the decimal separator defined by the format_number module.
@ciniko & @jasminedb : if you install format_number and configure the decimal point in admin/config/regional/format_number this should hopefully fix the issue for you
@iAugur I like the idea of a common module providing this functionality and will look at your links to see if it has relevance for commerce & webforms, I am a bit concerned however about the maintenance state of number_format as no commits for the last year.
Comment #7
guy_schneerson commentedcommitted http://drupalcode.org/project/commerce_decimal_quantities.git/commit/ea3...