Answer the question
In order to leave comments, you need to log in
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
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).
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).
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 ;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question