4 replies [Last post]
michels's picture
Offline
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205

Some things in life are not integer..

For example if you want to sell something per inch/metre. Or per pound.
Maybe for a butcher-ubercart-shop Smiling

Therefore, the customer must enter a float value like 1,3..

So I think, when you create a product-node, there should be a checkbox with "Customer could enter float-value".

What do you think?
Any Ideas how to realise that?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6841
Re: Comma values in quantity field

You can put in float values, but you have to do it the American way, with the decimal point (e.g.: 1.4) That's because of the way PHP and SQL interpret numeric strings. Changing the way this works would be pretty significant, but it might be a good exercise for the localization module.

cYu
cYu's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 11/19/2007
Juice: 850
Re: Comma values in quantity field

michels, I brought this up a little while ago here....
http://www.ubercart.org/forum/ideas_and_suggestions/2510/quantity_decimal
Lyle outlined some of the aspects of core that would need adjusted.

michels's picture
Offline
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205
Thanks for the answers.

Thanks for the answers.
And sorry, I didn't see that post.

It doesn't make sense when I change the core for myself and can't update anymore..
Lyle you don't sound like someone who wants to implement that in Version 1.0, aren't you Smiling

Btw: Of course I can enter "1.4". But it doesn't have any effect, cause it would be rounded to "1".

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6841
Re: Thanks for the answers.

Oh, the quantity field. Sorry, I thought you were talking about a general problem, and not that specific place. That's a completely different thing.

I'm still not sure if I want to do anything about it though. Eye-wink