I am attempting to set up a WA Server Validation to prevent adding more to cart than in stock (as discussed in this thread above). I have taken your recommendation to accomplish this through server side validation, but I cannot get it to work properly.
1. Stock Amount is set in my DB as the column "stockAmount" int(11).
2. rsBooks pulls the necessary stockAmount for use on the page by the validation code.
3. My validation code appears to be below the rs code.
Can't seem to determine why it is not working properly. If fails validation all the time (regardless of stockAmount or how many are in cart).
Attached is my code and a few screenshots. Any help is much appreciated.