How can I limit product quantity selections in my inventory?

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.?

1 Like

@Khan01
Because you have only one Quantity lefft.

Then How it will increase the 2 or more quantity,

So increase the Product Quantity first.

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.

@Khan01
Hire a developer to fix out your issue.
Let me know if you need help from us.
Thank you

I am not looking for a developer at the moment.
I know this needs a small code snippet that I can’t locate at the moment

@Khan01
Then contact to Shopify Support team might be they help you.