tags:

views:

153

answers:

9

If a customer were "silly" (being polite here) enough to try and add, as an example, 4.6 items to their basket, what would you expect to see? or how would you deal with it. Obviously, we only deal with digital quantities (our hacksaw broke last week).

There seems to be a lot of inconsistence across the web.

  • Amazon Rounds down (4.6->4, 1.3->1)
  • FireBox Rounds (4.6->5, 1.3->1)
  • Ebuyer ignores the input (no error)
  • Expansys removes the item from your basket
  • I'm assuming some site will show an error

Which is the best solution

+4  A: 

How about validating the user input and accepting only numeric characters?

Dante
A: 

One solution would be to inform the user that their selection is invalid when they tab off the edit field that's allowed them to enter the fraction.

A lesser option would be to round (down, unless you're greedy to sell 1 extra item), or to reject the input completely.

The best solution is to prevent fractions in the first place by giving them a slider or spin control to select only whole numbers.

gbjbaanb
+4  A: 

One solution would be to bring the incorrect input to the user's attention so they can correct it. Rounding can be too much of an assumption depending on the context.

Displaying an error message next to the amount something like this: "I'm sorry, we cannot supply you with 4.6 items. Please enter a whole number." ...or something along those lines.

Another solution would be to avoid displaying error messages by restricting the input field to only allow valid input. ie If you don't want 4.6 items...only allow the user to be able to type 0-9. If the user can't enter incorrect input then there is never any reason to display an error message.

mezoid
I believe bringing it to the users attention somehow, because maybe they meant to type 43 and accidentally hit the . key. You wouldn't want to in that case round from 4.3 to 4 or 5, because you'd have an unhappy customer who'd get only a few items, and you'd miss out on selling almost 40 items.
AaronLS
+1  A: 

The best solution according to me would be

  1. Customer enters: 4.6
  2. Value changes to 5 after submitting (or if 4.4, round it to 4)
  3. Notice is displayed telling the user that only integers are valid and that the system has roundedy "your" input (4.6) to 5
gernberg
We are not talking 'knob positions' here to convert this way...
nik
Rounding up wouldn't be a good idea.Where would user be more dissapointed if he gets 1 more item than what he intented to buy?
Janis Veinbergs
I would say that correct rounding (up if >.5 or down if <.5) would be the "right" thing to do."Notice is displayed telling the user that only integers are valid and that the system has roundedy "your" input (4.6) to 5"That would be enought to inform the user that his entered value has changed.
gernberg
This is a stupid amount of unnecessary added complexity. Just don't allow decimals in this field. Make them enter what they mean.
Wahnfrieden
+8  A: 
  1. Add JavaScript verification that would remove non-numeric input while the user is typing in

  2. Implement backward solution for the situation when JavaScript is off, either display an error message or round the value but then display a message saying "your input has been adjusted"

ADDED: Also be aware that the character that separates the fractional part from the integer one differs from country to country. In US I believe it is '.', in Europe it is usually ','. If your applications is targeted at customers in different countries with varying number representation, it would make sense to implement the support for both characters in your application logic. Otherwise some users will get format error messages without knowing why - non-techie people are often unaware of this format issue.

Developer Art
This was more of the case of do I round up, down, nearest, ignore it, throw an error (or message)
Mez
Throwing away non-numeric characters might get you in trouble when a customer inadvertently order 46 of a product, instead of 4.6.
Ryan Fox
This would be more of a case when the user enters big quantities like 4.600 or 4.600.000. But you are right, this possibility should also be considered.
Developer Art
Rounding up or down is stupid if you can just prevent them from entering decimals in an integer field.
Wahnfrieden
+2  A: 

Assuming you're talking about a web app here, you can limit the characters allowed in the input box.

Alternatively, IMO you could use spinner (+/-) controls to change the quantity.

I believe tesco.com does this.

Hooloovoo
Right, and there’s no way to lift that restriction! At all!!1
Bombe
Any system can be circumvented, but if we're looking at simply stopping users from being stupid, then this should work - for a while, at least!
Hooloovoo
A: 

At the end it's always safer add server side check.

So if the input it's not an integer value:

  1. I will redirect the user to the same form.
  2. I will set the field with the floor value (4).
  3. I will put on top of the field a message like"This field must be an integer value. May be did you want 4 pieces of this product?"
ungarida
A: 

In my opinion if your product is an shopping system then it makes sense that primary goal is to sell some items. Usually customers want to perform as less actions as possible, so the system should predict what customer could possibly want when typing incorrect inputs.

  • Amazon Rounds down (4.6->4, 1.3->1) - the best for me, because everything after the decimal point can be destined to some other input;
  • FireBox Rounds (4.6->5, 1.3->1) - as for me I don't like when someone want to sell me more than I want to buy, so better 'floor' than 'round';
  • Ebuyer ignores the input (no error) - then you'll sell nothing and user needs to enter some values once again;
  • Expansys removes the item from your basket - terrible, now I need to search for the item in the shop once again;
  • I'm assuming some site will show an error. - not bad but required user to retype value;

I would implemented as Amazon plus informing user that input was not fully clear and asking him to recheck the value. So if the system guessed right then user need to change nothing but if he mistyped he'll see it immediately.

Also you could log all this kind of incidents and then perform an analysis, what user typed for the first time and what was the actual count he bought. Just for curiosity...

Regent
A: 

Well, you definitely should never round up. You should not ever bill for more materials than the customer requested, no matter how inane the request.

Wahnfrieden