E
E
enchikiben2011-11-28 08:35:57
Electronic commerce
enchikiben, 2011-11-28 08:35:57

Shopping cart in the online store

Good morning!

I am doing an online store, I ran into a problem, the user in the basket can change the number of goods and at the same time the cost is calculated, through js, and if you do not limit the number of characters, then it may turn out that there will be numbers like: 1.6048148015252E + 16 rubles.

The question is, should the quantity be limited or not?

I looked at several of our online stores and foreign ones, this bug is not present in ours, most of them limit 999 in foreign ones.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrey, 2011-11-28
@reaferon

Depends on the type of goods IM. If you sell pencils, then the situation is quite acceptable when they order more than 1000 pieces. If laptops or refrigerators, then this situation is very unlikely. And if it does, it’s more likely through the fault of a mischievous person (which means you shouldn’t rejoice at such an order).

R
rPman, 2011-11-28
@rPman

Limit not the number of goods, but the amount of funds that your store is able to process at a time (the required quantity is not available) or you cannot serve a customer with a million in your pocket (limitations of a processing system or a bank, for example).

D
denver, 2011-11-29
@denver

If you are thinking about how to display 1000000000 items in the cart, you are a programmer. It would never occur to visitors to check this (unless they are programmers who find out what other programmers are doing in this case ;)

G
girichev, 2011-11-28
@girichev

Maximum number of goods = number of goods in stock.
For the user, you can withdraw 1 trillion, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question