checkout_v0.1.14
Gallery-Version = 2.1 Kern 1.1.0
PHP-Version = 4.4.2 cgi
Webserver = Apache/1.3.33 (Unix)
Datenbank = mysql 4.0.25-standard-log, lock.system=flock
Werkzeuge = ArchiveUpload, Exif, Getid3, NetPBM, SquareThumb, Thumbnail, Gd
Beschleunigung = none, none
Betriebssystem = Linux infong 2.4 #1 SMP Wed Jan 18 14:53:29 CET 2006 i686 unknown
Standard-Motiv = matrix
Sprache = de_DE
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Crazy Browser 3.0.0 Beta2)
Greetings from Germany - sorry for my english....
There is a problem with the total at the second step of checkout.
A price like 0,49 is shown in the 2 step as 0.00 (every Number after the , is converted to 00).
I think the reason for this problem is conected with the admin of checkout.
When I´m entering a price like 1.55 it will be converted to 1,55 after saving the changes.
I think the checkout module needs a price with a . but I can´t save this in the admin.
Thanks for your help
Posts: 8
Hi,
Maybe I can add some information on this one (have no solution for it though). Seems I have the same problem. On my local system (WinXP, Apache) it works fine. On the Linux (Apache) system the ',' and '.' are mixed up.
Checked the database table pluginparametermap (where prices are stored) and found 1.2 on the WinXP installation and 1,2 in the Linux system. It confirms kamivore's assumption that it goes wrong when inserting the prices.
Maybe it works on my WinXP system because the localisation does not work on that installation?! Got the following message in my Site Admin screen: Your webserver does not support localization. Please instruct your system administrator to reconfigure PHP with the gettext option enabled.
Well it might give some clues to the one who is able to solve this problem.
Regards!
Posts: 8
Hi,
Could not wait for a definitive solution, so this is the quick and yes, the dirty one...
Modify modules/checkout/Admin.inc, line 77 into
$newprice = floatval($form['price'][$i]);
And with this q&d solution you should enter prices with a '.' as decimal point!
[Be aware that this is not THE solution[/b] The solution itself might be more complex, since 'locale' is involved here -> Dutch & German have a ',' as a decimal 'point' while US has a '.'.
By the way, notice that the 'Postage amount' can be written with '.' and ',', both syntax will work! Well, this need some rework. Can someone help on this one?
Posts: 3
hi,
I have the same problem.
But this not solve it.
all the price with a "." are replaced by a "," when I save. And when I save again or when I return in checkout admin, the price is downgraded to the lower integer. For exemple, 0.20 become 0.
I'm using Gallery in french.
Where is the problem ? In gallery or in my apache/php config?
Thanks for your help.
Gérald.
Posts: 2
Try using
$newprice = str_replace(",",".",$form['price'][$i]);
instead of lines 74-78.
This is also an Ugly Terrible Horrible Hack, but at least it works for me.
This all definitely has something to do with server locales, but I can't figure out how
Posts: 431
I just noticed this post - somehow I missed it when it first came along.
The reason for this problem is that when the modules were written, Gallery did not support a "float" storage type in the database - it was either integer or string. As a result I had to hack the values in with some nasty PHP type casting, and I'm not surprised to hear that it breaks when you're not using '.' as the separator.
I will go back and look at this again, in the hope that I can now store non-integer values directly in the database!
Posts: 3
Thank you - your Terrible Horrible Hack works perfect ;)
Best Regards from Germany
Posts: 8
Thanks! - The hack works for me too!
Posts: 3
thanks, it works for me too