Bug Report - Negative Quantities and Arbitrary Symbols Allowed in Cart Quantity Field

2 mesi tempo fa
Summary:
When interacting with the shopping cart, users are able to input negative quantities, and the quantity field also accepts arbitrary symbols. This behavior is inconsistent with expected standards and can potentially lead to inaccuracies and confusion in the ordering process for the customer.

Steps to Reproduce:
1. Navigate to the shopping cart page.
2. In the quantity field, input a negative number (e.g., -2) and press Enter.
3. Input any arbitrary symbol (e.g., "$" or "!") in the quantity field and press Enter.

Expected Results:
- Upon entering a negative quantity, the system should immediately validate and prevent submission, displaying a relevant error message.
- The system should disallow and prevent entry of arbitrary symbols in the quantity field, providing a prompt for valid numeric input.

Actual Results:
- Negative quantities are accepted without immediate validation, which leads to a worse user experience than immediate validation
- Arbitrary symbols are allowed in the quantity field, which could cause confusion and errors in the ordering process of the customer.

Impact:
For example, if a customer enters a quantity of "6" and then attempts to update it to "7." with a dot, the system fails to update to "7" and reverts to the previous quantity of "6". Also without an error message. This behavior may lead to incorrect expectations from the customer if they do not notice the discrepancy. It is crucial to address this issue promptly to ensure data integrity and a seamless shopping experience for users.
2 mesi tempo fa
What nopCommerce version?
I cannot reproduce this on the latest "develop" branch, probably this has been fixed in #5653 or during other tasks implementation.
2 mesi tempo fa
The cart quantity is validated server side which means quantity can't be updated to decimal or smaller than 1.
Innovapps wrote:
Summary:
- Upon entering a negative quantity, the system should immediately validate and prevent

If my understanding is correct, you are suggesting to restrict the input of the invalid quantity directly at the client side, right? This may not necessarily a bug but a nice to have functionality.