Stop selling when "stock is under X"

New Member
2 0 0

Hello, I have been having a problem with overselling my popular items...I would like to set the product to stop selling when the quantity is at 1 or 2.


I have not been able to find anything on this subject.  Please help!



Shopify Expert
1104 88 247

You can do this with some Liquid code, I would probably use variant.inventory_quantity (, to check inventory levels.

Then if quantity < 3, you can either not show the add to cart button, or disable it and add some messaging.

If you prefer to hire out for this feel free to contact my team at, we do custom coding like this every day.

Another option, if you want to stop selling when out of stock but collect email addresses, you can use the app Now Back in Stock.

Founder of Speed Boostr (Shopify optimization experts, theme customization, custom app development).
Creator of Shopify Analyzer (first performance analysis tool for Shopify sites, free for the Shopify community).
Creator of Order Automator (auto tag orders and customers + auto fulfill orders + email notifications).
Creator of Theme Scientist (A/B testing app) and Tip Jar (add a tip button to your store).