Report by developer:
We are writing to report an issue with the Tradly Add to Cart API. We have discovered that the API allows users to add items to their cart with a quantity of zero. This is causing problems for our users and our business.
Specifically, when a user adds an item to their cart with a quantity of zero, the item is not deleted from the cart. Instead, it remains in the cart as an item with a quantity of zero. This can lead to several problems:
-
Users may be confused to see items in their cart with a quantity of zero.
-
Our backend code is not designed to handle items with a quantity of zero, and this is causing errors.
-
This could potentially allow users to exploit the system to gain an unfair advantage.
We believe that this issue can be easily resolved by either:
-
Using our frontend code to call the Delete Cart Item API if the quantity is zero.
-
Using the backend to handle decrements/increases in quantity and add to cart.
However, we would prefer to avoid having to make changes to our code, and we believe that this is a bug in the Tradly API. We would like to request that you remove the ability to add items to the cart with a quantity of zero, or at least prohibit it during the add to cart process.