Forums / Templates, Stylesheets, Page Layout / Comma as decimal separator in quantity field

Comma as decimal separator in quantity field

Locked

Started by miriam_t on 8 Dec 2009, 11:24 AM · Views: 2,727

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
8 Dec 2009, 11:24 AM
#1
miriam_t avatar

miriam_t

New Zenner

Join Date:
May 2007
Posts:
38
Plugin Contributions:
0

Comma as decimal separator in quantity field

Hello @all!

I've a problem that was'nt solved as far as I searched for a solution:

We are selling cloth in a european country and the quantities are measured with a comma instead of a point. I managed to change the appearance of the prices in the shop so that prices are shown correctly as 10,50 Euro per meter. BUT:

I really need to set the comma as decimal separator also for the quantity! People go and override the shown minimum quantity with a comma-value and get a message stack output, that the item is in the shopping cart, but it wasn't processed correctly. :no:

The best would be a solution, where the input of a comma results in a point for the quantity in the shopping cart. This can be done probably by javascript?

At least I need a hint / error message for the customer when he puts in a comma in the quantity field.

Does anybody know a solution like this?

I already found a forum post regarding this: http://www.zen-cart.com/forum/showthread.php?t=102569

But I hope it is ok to start this new as it should be a general customization question in frontend, I think.

8 Dec 2009, 1:04 PM
#2
spid3r1987 avatar

spid3r1987

Zen Follower

Join Date:
Jul 2009
Posts:
497
Plugin Contributions:
0

Re: Comma as decimal separator in quantity field

so on the quantity, AFAIK, you cannot enter a "special" character..
e.g ,./? etc

i may be proven wrong on this :)

i may not know how yet, but i soon will....i hope :)

9 Dec 2009, 8:50 AM
#3
miriam_t avatar

miriam_t

New Zenner

Join Date:
May 2007
Posts:
38
Plugin Contributions:
0

Re: Comma as decimal separator in quantity field

You can - but it will not be processed correctly except for the point (.). If configured in admin/configuration/stock management/Decimals in quantity you can choose how many decimals are allowed. So I can give 2 decimals to my quantities to allow customers to buy 0.5 meter of cloth. Zen Cart also manages the minimum quantity there and everything works correct: but with the point - not with a comma.

And that's the problem: my customers are used to commas as decimal separator and there is nothing I could do about that. They will use the comma to put 0,5 meter cloth in the shopping cart - but Zen Cart will put nothing in the shopping cart because it doesn't accept the comma. Currently they don't even see an error message.
:(
So I really have to solve that.

Any ideas?

9 Dec 2009, 2:12 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Comma as decimal separator in quantity field

admin/localization/Currencies

Select your currency and click Edit. Change the decimal point and thousands separator as you wish.

Rob

Breakfast: the most important donut of the day.

9 Dec 2009, 3:03 PM
#5
miriam_t avatar

miriam_t

New Zenner

Join Date:
May 2007
Posts:
38
Plugin Contributions:
0

Re: Comma as decimal separator in quantity field

Yes! I've done that already - but this doesn't change the quantity decimal!!!

It does apply to the prices - and there it's working. But the quantity decimal isn't changed by that currency decimal modification.

rstevenson:

admin/localization/Currencies
Select your currency and click Edit. Change the decimal point and thousands separator as you wish.

I interchanged point and comma to get european style prices like EUR 15,45 or EUR 1.500,45. But this does not apply the decimal in the quantity field!

Is there another idea?

9 Dec 2009, 8:29 PM
#6
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Comma as decimal separator in quantity field

Right! I see now.

All the references I could find in the database were also related to currency decimal places.

Let's hope the devs chime in. They may be the only ones who could figure this out.

Rob

Breakfast: the most important donut of the day.

5 Jan 2010, 9:29 AM
#7
miriam_t avatar

miriam_t

New Zenner

Join Date:
May 2007
Posts:
38
Plugin Contributions:
0

Re: Comma as decimal separator in quantity field

I need to push that as I haven't found a solution to this problem yet.

Is it possible to change the decimal in the quantity field to a comma? Perhaps the same function can be used which does this for the currency field?

Please....:ohmy:

28 Dec 2010, 3:05 PM
#8
miriam_t avatar

miriam_t

New Zenner

Join Date:
May 2007
Posts:
38
Plugin Contributions:
0

Re: Comma as decimal separator in quantity field

I must admit that this problem hasn't been solved yet. Current version of my shop is: 1.3.8 with some fixes.

Is this probably solved in 1.3.9? I still didn't update because of some changes...