How to Easily Limit Quantity Per Customer on Shopify

Learn how to set and enforce quantity limits per customer on Shopify with simple steps. This guide ensures fair stock distribution and a better shopping experience for all.

a woman in a red and yellow top with braids
By Jameela Ghann
Photo of Danell Theron
Edited by Danéll Theron

Updated February 18, 2025

a woman sitting in front of a laptop surrounded by boxes

Limiting quantity per customer on Shopify is a smart strategy for merchants looking to manage product availability and prevent stock hoarding. Whether you're offering exclusive products or running limited-time promotions, Shopify's limit on quantity per customer ensures a fairer distribution of your stock. Shopify makes it easy to set and enforce quantity limits, helping you control how many items each customer can purchase.

This ensures that popular items don't sell out too quickly and are available to a wider range of customers. In this guide, we’ll walk you through the simplest ways to set up these limits, ensuring a smooth shopping experience for all your customers. You don't need coding expertise to take advantage of this feature—just a few steps and you're good to go.

» Optimize and simplify management of your Shopify store using our automated solutions

a woman in a red and yellow top with braids

Meet the Expert

Jameela Ghann is a seasoned online store owner with over a decade of eCommerce experience. She's also the marketing manager for Fera Product Reviews.




4 Reasons Why Stores on Shopify Would Limit Quantity Per Order

1. Stop Resellers in Their Tracks

Setting purchase limits prevents resellers from hoarding high-demand products and flipping them at inflated prices. We’ve seen this with Supreme, Stanley, and Starbucks cups. Shopify's limit on quantity per order keeps inventory available for actual customers, ensuring fair access and reducing frustration. It also helps brands maintain pricing integrity and avoid market saturation of their products.

2. Keep Inventory in Check 

Limiting quantity per customer ensures stock doesn’t disappear in minutes, giving more shoppers a fair chance to buy. This also helps brands manage supply chain expectations and reduces the risk of overselling (which is a huge customer service headache). That’s because overselling can lead to fulfillment issues and negative customer experiences. 

» Learn how to manage overstock and understock in your Shopify store

3. Better Customer Experience

Stores want to avoid negative customer experiences at all costs. Customers appreciate transparent and fair purchasing policies. When they see quantity limits in place, it reassures them that they have an equal chance to buy, leading to stronger brand trust and customer satisfaction.

4. Stronger Brand Loyalty

Trust builds brand loyalty. When customers feel they are treated fairly, they’re more likely to return for future purchases. Shopify's limit of one per customer prevents frustration and enhances loyalty, creating long-term brand advocates and people coming back for future drops.

» Looking for inventory management apps? Discover the best inventory management apps for your Shopify store

Effortless Inventory Management

EGNITION’s tools automate inventory, letting you focus on growth.

Out-of-Stock Police: Automate out-of-stock product handling.

Multi-Store Sync Power: Sync inventory across stores effortlessly.

Bestsellers reSort: Organize products by top sellers for better visibility.




Per Order Limit vs. Per Customer Limit

  • Per order limit: This feature restricts the number of items a customer can buy in a single transaction, ensuring a fair distribution of stock. However, shoppers can easily bypass this by placing multiple orders, potentially undermining the intent of the limit.
  • Per customer limit: This limit places a cap on the total quantity a customer can purchase over a set period, making it a more effective tool for stock control. It helps prevent one individual from acquiring too much inventory, ensuring that more customers have access to the product.

» Read more: Can I limit product quantities in my Shopify store?

Challenges of Enforcing Per-Customer Limits

  • Tracking purchases: Without requiring customer accounts, it’s difficult to monitor purchases, especially if guests check out anonymously.
  • Multiple accounts: Some shoppers may create multiple accounts to bypass restrictions.
  • Manual enforcement: Without automation, managing per-customer limits can be time-consuming

» Quick refresher: Understand how to do a quick order on Shopify



2 Methods to Limit Quantity Per Customer in Shopify

Since Shopify doesn't offer a built-in feature to limit product quantities per order store owners have to use workarounds.

1. Coding

When it comes to coding, this allows you to set maximum quantity limits per product variant directly within Shopify's admin panel. However, it requires familiarity with Shopify's Liquid templating language and theme code editing. The drawback is that this approach may not prevent customers from placing multiple orders to get around the limit. 

Step-by-Step Guide to Editing the Code

1. Access your theme code

Start by navigating to your Shopify admin panel.

2. Open theme editor

Go to Online Store > Themes to access your theme settings.

a screenshot of shopify webpage on themes


3. Locate the code file

Click the three dots () next to your theme and select Edit Code to open the code editor.

a screenshot of shopify webpage showing to click on edit code


4. Find the relevant section

In the editor, search for main-product.liquid

a screenshot of shopify webpage showing to search for code


5. Search for this code

<input
class="quantity__input"
type="number"
name="quantity"
id="Quantity-{{ section.id }}"
data-cart-quantity="{{ cart_qty }}"
data-min="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
min="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
{% if product.selected_or_first_available_variant.quantity_rule.max != null %}
data-max="{{ product.selected_or_first_available_variant.quantity_rule.max }}"
max="{{ product.selected_or_first_available_variant.quantity_rule.max }}"
{% endif %}
step="{{ product.selected_or_first_available_variant.quantity_rule.increment
}}"
value="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
form="{{ product_form_id }}"
>

6. Replace it with this code

<input
class="quantity__input"
type="number"
name="quantity"
id="Quantity-{{ section.id }}"
data-cart-quantity="{{ cart_qty }}"
data-min="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
min="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
{% comment %}{% if product.selected_or_first_available_variant.quantity_rule.max != null %}
data-max="{{ product.selected_or_first_available_variant.quantity_rule.max }}"
max="{{ product.selected_or_first_available_variant.quantity_rule.max }}"
{% endif %} {% endcomment %}
data-max="5"
max="5"
step="{{ product.selected_or_first_available_variant.quantity_rule.increment }}"
value="{{ product.selected_or_first_available_variant.quantity_rule.min }}"
form="{{ product_form_id }}"
>

7. Hit save

» Need more tips? Learn how to manage your Shopify inventory better

2. Third Party Apps

For those less comfortable with code modifications, third-party apps like Pareto and MinMaxify offer user-friendly interfaces to set purchase limits. These apps provide more comprehensive control, including setting minimum and maximum quantities per product or order, and can apply restrictions across collections or the entire store. They also often include features to prevent customers from bypassing limits by placing multiple orders.

Screenshot of shopify apps to limit order quantity



Quantity Control with Shopify Scripts

Advanced Control with Shopify Scripts

Shopify Scripts, exclusive to Shopify Plus, allow merchants to customize cart and checkout behaviors for precise quantity restrictions. For example, you can limit one per customer on Shopify, ensuring fair distribution of high-demand products and preventing stock hoarding.

Key limitations to consider:

  • Technical expertise required: Implementing scripts requires coding knowledge, so store owners may need to hire a developer, adding to the overall costs.
  • Resource limitations: Shopify scripts must operate within set resource limits to maintain store performance, which can restrict more complex operations.
  • Future changes: A major consideration is Shopify’s plan to phase out scripts by August 28, 2025. Any quantity restriction setup using scripts will need to be transitioned to alternative solutions in the near future.
  • Compatibility issues: Some third-party apps or custom store themes might not work seamlessly with Shopify Scripts, requiring additional adjustments or compatibility checks.
While Shopify Scripts offer powerful customization for quantity limits, merchants must evaluate the costs, technical requirements, and Shopify’s roadmap before relying on them.

» Aside from limiting quantity per customer on Shopify, here are more ways to make your Shopify store a better one

Automate Inventory with EGNITION

Automate inventory management for greater accuracy and a better customer experience.




Best Practices to Prevent Customers from Bypassing Quantity Limits

  • Disable dynamic checkout buttons: Checkout buttons like "Buy It Now" allow customers to skip the cart and proceed directly to checkout, potentially bypassing quantity restrictions. By disabling these buttons, customers must go through the cart, where limits can be enforced.
  • Use customer tags: Assigning tags to customers upon purchase helps track their order history. Many Shopify apps offer this feature to identify repeat purchasers attempting to exceed quantity limits across multiple orders.
  • Monitor IP addresses: Tracking IP addresses can help detect multiple accounts originating from the same location. This allows store owners to prevent users from creating duplicate accounts to bypass purchase limits.
  • Automate workflows with Shopify Flow: Shopify Flow can be used to create automated workflows that monitor and enforce quantity restrictions. For example, a workflow can automatically flag or cancel orders exceeding set limits.
  • Implement pop-up alerts: Pop-ups during the checkout process can inform customers of the quantity limits and prevent them from proceeding if they attempt to bypass them.
  • Limit account registrations by email address: Restricting multiple registrations under the same email address can reduce the chances of customers creating additional accounts to skirt quantity limits.

Pro Tip: Make quantity limits clear upfront to prevent frustration. Shoppers should see purchase limits on product pages, in the cart, and at checkout. This reduces confusion and helps build trust.

» Read more: How to add checkout disclaimers to your Shopify store

Pros and Cons of Shopify Flow

Pros


  • No-code automation for quantity restrictions.
  • Real-time enforcement of purchase limits.
  • Reduces manual oversight.
  • Seamlessly integrates with store operations and apps.

Cons


  • Time-consuming setup and configuration.
  • Limitations in complex workflows.
  • Minor use cases may not justify the effort.


2 Examples of Brands Enforcing Quantity Limits

1. Supreme

The streetwear brand Supreme is known for its limited-edition product drops, often leading to high demand and quick sellouts. Supreme enforces strict quantity limits to maintain exclusivity and prevent resellers from monopolizing stock, typically restricting purchases to one item per customer per product. This strategy preserves the brand's exclusivity and ensures that customers can access their products.

Implementing strict purchase limits can help maintain product exclusivity and ensure fair distribution among customers.
screenshot of supreme FAQ section, red block around the "Why can I only buy one style per product"


2. Kylie Cosmetics

Kylie Cosmetics, known for its high-demand makeup products, enforces quantity limits to prevent bulk purchasing and reselling. Limiting the number of units per product that a customer can purchase ensures more customers can buy their products, enhancing customer satisfaction and brand loyalty.

Enforcing quantity limits can enhance customer satisfaction by providing more customers the opportunity to purchase high-demand products, thereby fostering brand loyalty.
a screenshot of kylie cosmetics, product page, with a red block around "sorry you can only add a max of 10"


» Interested in building customer loyalty? Learn how automated rewards apps can help

Loyalty Through Quantity Limits

Beyond quantity limits, efficient inventory management prevents stock issues and keeps customers coming back.




Managing Quantity Limits on Shopify

Effectively limiting quantity per customer on Shopify ensures fair distribution and prevents stock manipulation. While automation tools like Shopify Flow simplify enforcement, thoughtful setup and clear communication are key to avoiding customer frustration. Striking a balance between restriction and user experience helps maintain trust while protecting your inventory. While Shopify doesn't offer built-in functionality to limit the quantity per order, merchants can use third-party apps to manage demand without restricting the overall shopping experience.

By implementing the right strategies, you can control demand while fostering long-term customer loyalty.

» Improve customer experience by taking control of your Shopify store through automation

New to Shopify?

Launch your eCommerce business with Shopify's powerful platform. Get everything you need to create, manage, and scale your online store with ease. Join millions of successful merchants worldwide.

Continuous Innovation

We regularly release new features and improvements based on merchant feedback. Our development roadmap is shaped by your needs, ensuring our Shopify apps evolve with your business.

Expert Support Available

Our dedicated support team is available 24/7/365 to help with any questions about our Shopify apps. Reach us through the support icon in any app or email us at support@egnition.io

Pin It on Pinterest