how to limit product quantity selector as per stock available

Topic summary

Goal: Limit the product quantity selector to available stock (e.g., if only 2 left, prevent selecting 3), by disabling the plus (+) button and reducing its opacity, varying per product.

Approach: A participant offered to implement this via custom code and requested access to review the theme. “Collaborator code” refers to Shopify’s developer access for collaborating on a store.

Actions taken: The store owner (Impact theme) agreed and shared the store URL and collaborator access via direct message to proceed with the customization.

Latest update: Another user with a different theme asked if a solution was found, suggesting this is a common requirement. No public code or step-by-step solution has been posted in the thread.

Status: Unresolved publicly. Likely requires theme-specific custom code to cap quantity at the inventory level and disable the increment control accordingly. Open question: confirmation of the implemented method and whether a generalizable solution exists across themes.

Summarized with AI on December 13. AI used: gpt-5.

For eg: if my product has only 2 stock left, than the customers should be limit to select 3 quantity on product page, after selecting 2 quantity the + (plus) button on product page should be disable & Reduce the opacity.. it should be differ from product to product as per their stock left

i’m using impact theme

Hi, @Emiway1

I can help you with it. But it needs to add some custom code. If you need my help, please let me know.

Yes Please

I need to check your theme code so that I can help you add the custom code to implement the feature. So can you share me your store url and collaborator code?

Sending in Dm

Hi @Emiway1 I have the very same query (different theme) and cannot seem to find a solution to what I believe is a very common thing to have on an online store! Did you find a solution by any chance please?