For a simple feature like this Shopify should code it in the backend instead of store owners having to do the heavy lifting, please pull up your socks Shopify and make this a basic offering.
My store is looking for this functionality as well. I am not super knowledgeable when it comes to coding, but I’ve tried a couple solutions I’ve come across on these forums and none of them quite work.
It’s just mind-blowing to me that this still isn’t a native feature in 2022. We already use about a dozen apps for relatively simple feature add-ons, and installing more just isn’t sustainable or acceptable.
We have a popular USA-exclusive product that we want to limit to 1 per customer to prevent resellers from buying them up and shipping them out of the country via freight forwarders (which is ANOTHER problem for which Shopify’s solution is “get an app”). We’ve tried adding language in the product description that says “Limit one per customer” but this message just gets ignored. And it’s a pain for our customer service team to cancel these orders after the fact.
Hoping Shopify finally gets around to adding this feature soon (or someone comes along with a good coding solution).
I understand you are not looking for app, but I don’t think such solution is available by default in shopify at the moment.
I would suggest to check out our app for it
We also would love this feature. We are planning on having a free + shipping test product that customers can try out to see if they like our product. Obviously we don’t want to sell 30 units for free to a customer. It would be great if Shopify had an intrinsic feature to limit the quantity for certain products.
Yes it feels odd that after years of requests for this basic shop feature it is still not available in the core Shopify. While Multi-Language and other features might be complicated in core I do not think this one should be consuming much time from the core coder team.
I really wonder how shopify will evolve regarding this and other features pretty standard in the main competitors but only available by subscriptions Apps in shopify.
This will only stop someone from selecting a higher value when adding to cart all at once. This doesnt stop them from going back to the item and adding another unit.
You can do this with Custom Data by adding a field to all your products called Max Cart Quantity, then edit your Liquid templates in the right place to set the max=“” field on the Quantity <input HTML tag.
Steps:
Go to Settings → Custom Data → Products
Click Add Definition
Add a new field called Max Cart Quantity
Take note of the Namespace and Key field. This will be important for the Theme editing.
Select Type as Integer. Set Minimum Value to 1 so that you can’t enter an negative quantity.
I’ve worked on this for a bit.. and there are a few things that can be done to keep it simple:
Make sure the field on the “View Cart” page has a min, max, pattern, make it read only and hide the buttons if the line item of the cart contains a word (for example). Make sure that the sidebar cart has the exact same stuff in it.
Make sure that the product page or the button that you have implemented on any page is only there if the item isn’t already in the cart. There’s code floating around for this in this community.
And for now.. if you want to keep it simple..:
For those same product page or button.. make sure that it redirects to the cart (add hidden input field called return_to and give value of /cart. (or add this to the href string)
I’m trying to get some javascript together that would go around this last one.. because I have a page where the customer needs to stay on the page after the ‘add to cart’ click, but needs to check if the item is in the cart. It does find it in the cart, but can’t figure out yet how to prevent to have it actually add to the cart…
I am building my first online store and beginning to think I should have gone with another ecommerce platform as the basic functionality (quantity limits, purchaser email verification options, etc) are still not available after neraly 5 years. And to see the issue was ‘solved’ by subscribing to an app is absolute poor form Shopify. Reconsidering my initial choice…
This should easily by a Shopify native function. We want to offer our customers a one time sample of our product, surely we should need ANOTHER app for this. It’s bad enough we need an App to send our customers a Tax Invoice!