In the above example, we have only 1 item left of these in the inventory.
What we are trying to do is, once the customer goes from selecting 1 quantity to 2 quantity; they shouldn’t be able to do that and would rather be shown an error message.
Also if he/she clicks the Add to Cart button, they are shown the same message.
P.S: I need the Error message to be shown in the above position.
Can someone please help where and what code changes do I need to make to do this.?
Thats the problem.
Even though I have only 1 item left, the customer can still move the Quantity counter Up, which I don’t want. I want the Quantity counter to stop after it has reached the maximum level and throw an error.