Hi!
It did work! I was looking for “product-quantity.liquid” as mentioned, but it actually is “quantity-input.liquid”
A Shopify store owner encountered an issue where customers could add more items to their cart than available inventory, despite receiving a generic error message that didn’t specify the actual stock quantity.
Initial Solutions Provided:
Technical Fix (Dawn/Studio Themes):
A working solution involves editing the main-product.liquid file in the theme’s sections folder by adding max attributes to the quantity-input element:
max="{{ product.selected_or_first_available_variant.inventory_quantity }}"
data-max="{{ product.selected_or_first_available_variant.inventory_quantity }}"
Theme-Specific Variations:
product-quantity.liquid (or quantity-input.liquid) with similar max attributes using variant.inventory_quantityOngoing Issues:
Some users report the solution doesn’t work correctly when:
Hi!
It did work! I was looking for “product-quantity.liquid” as mentioned, but it actually is “quantity-input.liquid”