![]() |
[4.0] Number format The number format in Classifieds is set with a point e.g. I have to put in shipping cost as 1.50 But in Germany (and many other countries) we write it not with a point but with a comma (1,50) If I write it with a comma (1,50) the result is 150 I think this will confuse my users. Is there a possibility to change the format from point to comma? |
The currency type in the program determines the actual number format Like I know Lira and Franc use that currency format so it all depends on the currency format of that ad how things are displayed so if your currency for the ad is USD then thats why it displays like that |
I don't understand you. I use EURO and I can't put in a sequence of numbers separated wth a comma. It must be separated with a point. Where can I change this to a comma? btw: Lira and Franc are not valid currencies since 18 years. They should not be in. ;) |
Okay well try replacing this into the currency table in phpmyadmin REPLACE INTO cp_currency VALUES (9,'Euro','EUR','€', '1'); |
I change the field type in the table currency to the values 1 and than to 2. Both takes no effect! Input: 5,60 or 5,6 Output: 560.00 or 56.00 € |
If the ctype for Euro is 1 and your default currency is Euro the display should indeed change Code: Content visible to verified customers only. |
The above code is from showproduct.php? Correct? After changing the type to "1" I have the result: Input with comma on uploadproduct.php: 5,60 / Output on showproduct.php: 560,00 Input with point on uploadproduct.php: 5.60 / Output on showproduct.php: 5,60 The output on showproduct is now correct. But I need more the input on uploadproduct correct (for me... with comma). edit: Is this someting to edit in uploadproduct? Code: Content visible to verified customers only. |
uploadproduct your simply inputting a straight 2 digit number For display throughout the program as long as your global currency is euro and you have made the change I noted it should display like you want throughout the entire program on showcat showproduct index etc |
Quote:
|
I am not following here what your really asking because the change I gave you should change the number format for display in ads on the index etc to a comma |
Yes, it changed the number format on showproduct! But not correct. I want to write in the form uploadeproduct the asking price / shipping cost with comma. E.g. 6,66 If I do that the result is in showproduct with comma, but it's now 666,00 If I fill in the form uploadproduct the digits with a point (e.g. 6.66) the result is correct with 6,66. I am asking what to change for uploadeproduct that I can fill in there the price with comma. |
You cant do that. The upload page should correctly say in format 0.00 what I am saying is if you changed the euro ctype to 1 then throughout the program any currency you enter will be 6,66 if you enter 6.66 on upload |
Than we have had a problem in understanding. My only intention was to change the format in the form uploadeproduct because our normal format is with comma. Without that I see many problems when user see their ads listed with 1000 Euro instead of 10,00 Euro. |
I dont think so. If your global currency is euro then unless the user changes there format the price should be 1000,00 Currency my understanding in any format is always dollars and change. You are free to modify your uploadproduct file yourself to suit your needs cause really what your asking is there to be no change. The PHP number format for example which we use and formats based on currency places a comma or decimal in the proper place The mysql price field in the program is a floating point 2 decimal field for numbers My suggestion would be you edit the language string in admin to make it more clear to your users. That would probally be best. Because if your wanting to enter 1000 euros whether its dollars or euro's it would always be 1000.00 or 1000,00 If you enter either it will display as 1000 euros |
Chuck, the problem is not 1000 Euro or Dollar. The problem is 10 Euro and 50 Cent (or 10 Dollar and 50 Cent). Our separating operator for this (I guess in the whole EG) is the comma, not the point. For this it is logical that we write also with a comma. But when I write 10 Euro and 50 Cent (or 10 Dollar and 50 Cent) in our format it is 10,50. 10,50 (with a comma) gives the result 1050,00 (or 1050.00) But okay.... |
Mike without modifying something you want to enter 10.50 |
Just a sidebar here as stated the field itself is a mysql float point field which is why it is 10.50 |
That I have understand. Because I don't know what to edit I must write a description in the form that the user have to place the unnormal format with a point. . |
Quote:
number_format(200000); // 200,000 number_format(200000, 2, ",", "."); // 200.000,00 number_format(200000, 2, ".", ","); // 200,000.00 number_format(200000, 2, ",", ""); // 200000,00 But it's okay with me, Chuck |
In the program the format for euro is number_format(200000, 2, ",", ""); So that is displayed 2000,00 That is the correct format that I see You can read up on number format at php.net |
| All times are GMT -5. The time now is 02:36 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0