I would like to limit quantity which is possible to order per basket, for example, I don't want to sell over 100 items per person.
I believe there is a lot of different paid apps, but i try to avoid additional unnecessary costs. Is there any way of doing this by editing the code?
Is there any tutorial for this?
Thank you in advance.
Thank you for reaching out and posting this question!
I understand you're looking to set a quantity limit to the cart and you prefer not using an app for this. Nevertheless, the easiest way to accomplish this is through a third-party app, such as Order Limits - MinMaxify or Order Limits (Min-Max), as they provide a user interface that allows you to manage these limits. In addition, if you need any assistance with setting up one of these app - the app developers are always available to assist you. You can contact the developers directly through the contact information found in the Support section of their app pages.
That being said, if you prefer to have something like this hard-coded into your theme, then you can also consider hiring a developer to assist you with this. However, I'm not having any luck finding an available tutorial for this. If you need help finding a developer, I'd recommend taking a look at Shopify Experts. Shopify Experts is a directory of certified developers that have experience working with custom coding and they'll be able to create a custom solution for your store.
Since adding a quantity limit could potentially limit your conversions and revenue, may I ask why you don't want customers to purchase more?
Thank you for following up!
I can see how having a tutorial or built-in option for limiting quantity can be beneficial for some of our merchants, like yourself, and I'd be happy to submit a feature request on your behalf. Though this isn't something that I'll be able to provide an ETA, as our Development team works on many different projects. Nevertheless, if Shopify moves forward with any changes or updates on limiting quantity, we'll be sure to announce it on our changelog and/or updates page.
If you have any other questions on this topic, don't hesitate to let me know!
There is an old method available https://github.com/carolineschnapp/limiter but no idea of if it's compatible with current themes.
but that still doesn't track the CUSTOMER so you have to check previous orders, though you could tag them and then add a check on product pages to disable the add to cart for those customers.
An alternative is trying to use the discount systems "limit uses" feature
In total it's a lot of moving parts which is why there's no native feature and you either need an app or advanced theme customization and an app for the backend.
Merchants that need this customization can contact me at firstname.lastname@example.org with store URL&Pass, use case and budget.