How to limit to one item and one quantity only per checkout?

Topic summary

A merchant seeks to restrict checkout to one item at one quantity per transaction.

Suggested Solutions:

  • Third-party apps: Shopify support recommends Order Limits (MinMaxify) app, which can set maximum quantities and restrict product groups. Another user suggests the MageComp Limit Qty Purchase app, noting it tracks customer purchase history and works well for digital products.

  • Custom code approaches: One user shares a Liquid template workaround by adding conditional logic to cart template files, targeting products by title (e.g., items containing “Promotion”). Another provides a detailed method using Shopify’s Custom Data feature to add a “Max Cart Quantity” metafield to products, then editing theme Liquid files to enforce the limit via the HTML max attribute.

  • Hiring developers: Custom-coded solutions through Shopify Experts are mentioned as an alternative.

Community Sentiment:

Multiple participants express surprise this isn’t a built-in feature, citing use cases like preventing resellers from bulk-buying limited stock and meeting legal quantity restrictions (e.g., liquor sales). Shopify support acknowledges the feedback and offers to file feature requests.

Implementation Challenges:

One user reports the custom metafield code solution didn’t work as expected, still allowing checkout despite error messages. The discussion remains open with no definitive resolution for all scenarios.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Hello! I guess I found the easiest solution. You need to add a simple rule in cart template file. Just find the quantity input and add an additional rule for products which you need using their title, for an example.

Here is my code example. I put the limit for promotion products, all they have a word “Promotion” in their title. So I used this word to make a rule for quantity limit only for these products.

{% if item.product.title contains “Promotion” %}

{% else %}

{% endif %}

8 Likes