Question regading: VM 2.6.0 (possibly also other versions)
Hello,
After a few hours searching I finally decided to post here for a hint.
I am looking for the code which accepts thr input from the cart page, and that validates the user-entered quantity.
I am searching for this code because it won't take into any account the "price_quantity_end" value that you enter in the product general info tab, with the purpose to limit the number of items that may be sold.
I also have discovered that entering "strange" values (eg. a character string) the line is deleted.
How to reproduce problem:
1) http://dasinfomedia.com.au/mojoomla/joomla/mj_cart/
2) put any item in the cart
3) View cart page
4) enter in the quantity field: "aa" and click UPDATE icon, the line will disappear. I would like a different action (eg. on invalid input, leave quantity untouched)
Anybody knows where to find the code?
I think a js is most suitable to catch that, else it is interpreted as zero, which is interpreted as the command "remove"
Thanks Milbo, this is a good point.
But supposing I need to do more checks which involve server-side, can you (or anybody) point me to where this checks are performed in the code? I looked at the Cart model, Product model, but I cannot find where the checks are being made...
cart function add and cart controller add respectivly addjs