Shopify Quantity Rules: How to Set and Increment Limits on Products

shopify quantity rules

Shopify Quantity Rules are essential tools for controlling how customers purchase products—by enforcing minimum, maximum, and incremental purchase quantities. These rules help increase average order value, prevent over-ordering, and ensure operational efficiency, especially for wholesale, B2B, or limited-edition sales.

Since Shopify doesn’t support these rules natively, merchants can implement them in three main ways:

  • Shopify Apps like EcomRise offer the easiest no-code method to apply quantity rules per product, variant, or collection.
  • Custom Liquid Code and Metafields provide more flexibility for developers to define rules directly in the product theme.
  • Shopify Plus Scripts give enterprise-level control, enforcing rules at checkout with Ruby code that cannot be bypassed.

The post also compares quantity rules vs. volume pricing vs. bundles, provides solutions to common setup issues, and explains best practices for combining multiple strategies without app conflicts or customer confusion.

If you've ever wanted to stop customers from buying just one item when you’re running a bulk sale or prevent someone from hoarding your entire stock of limited-edition merch in a single click, Shopify quantity rules are your new best friend. These rules are especially helpful if you're dealing with wholesale buyers, managing bundle deals, or simply trying to avoid inventory chaos. But Shopify doesn’t offer these features natively out of the box. So how do you make it work?

In this guide, we’ll walk you through exactly how to set Shopify quantity rules with or without apps, using Shopify Plus scripts, or even through custom code. Let’s dive in and make your checkout process smarter, smoother, and more profitable.

What are Shopify Quantity Rules?

Shopify Quantity Rules are settings or customizations that allow merchants to control how many units of a product a customer can purchase. These regulations are particularly helpful in keeping a check on the inventory level, promoting or deterring bulk deals, as well as during sales.

There are typically three types of quantity rules you can apply:

  • Minimum quantity: Customers must buy at least a certain number of units to check out.
  • Maximum quantity: Restricts how many units a customer can add to their cart.
  • Quantity increments: Forces customers to purchase in specific multiples.

These rules aren’t just about limiting; they’re also about strategic selling. For instance, a minimum quantity can increase your average order value (AOV), and increment rules make packaging and fulfillment much easier.

How to Set Up Shopify Quantity Rules (Minimum, Maximum & Increments)

To establish Shopify quantity restrictions such as maximums, minimums, or increments, you have the option of using apps like EcomRise to set them easily, no-code, or going custom with Liquid code and Metafields to have a better understanding of the process. On Shopify Plus, it is possible to use Shopify Scripts that help to enforce quantity restrictions at checkout, which is excellent when it comes to high-volume stores or wholesale stores. The methods differ in their sophistication as such select the method that is suitable for the size of your store, as well as the level of comfort with technology.

Using Shopify Apps

Actions such as minimum quantity, maximum quantity, or the quantity you need to purchase can be set easily with the help of a Shopify app. One of the easiest-to-learn ones is the MinMaxify.

shopify quantity rules

MinMaxify is a popular and highly-rated app on the Shopify App Store for setting minimum, maximum, and increment quantity rules. It's a powerful tool for controlling purchases, especially for B2B, wholesale, or limited-run products.

Step 1: Install the App

  • Head to the Shopify App Store and search for MinMaxify.”
  • To install it in your store, click "Add app" and follow the instructions.

Once installed, the app might guide you through a quick setup wizard in its dashboard.

Step 2: Create a New Rule

From the MinMaxify dashboard, you will be able to create new rules. A "rule" is a set of quantity restrictions that you define.

  • Click "Add New Rule": This will take you to a rule creation page.
  • Name Your Rule: Give the rule a descriptive name (e.g., "Wholesale Minimums," "Promo Item Limit," "Case Quantity Rule"). This helps you manage multiple rules later.

Step 3: Define the Scope of the Rule

You need to tell the app which products or groups of products the rule applies to. MinMaxify offers several options:

  • Entire Store: Apply the rule to every product.
  • Specific Products: Search for and select individual products or product variants.
  • Collections: Apply the rule to all products within a specific collection (e.g., "Wholesale Collection").
  • Product Tags: Apply the rule to all products that share a specific tag (e.g., "min-qty-12").
  • Product Type: Target a specific product type (e.g., "T-shirts").
  • Vendors: Target products from a specific vendor.

Step 4: Define the Quantity Rules

  • Minimum Quantity: Seek a field where an establishment can fix a minimum quantity of goods that a customer has to buy. In other words, in the case of sale in bulk, you could include a minimum of 10 units.
  • Maximum Quantity: Find the option to set a maximum number of items. This can be useful for limiting sales of a popular item or preventing a single customer from buying all of your stock.
  • Increments: This is where you can specify that a product must be purchased in multiples. For instance, if a product is packaged in groups of 5, you would set the increment to 5. This ensures customers can only add 5, 10, 15, etc., to their cart.

Step 5: Customize the Customer Experience

MinMaxify lets you customize the messages customers see when they don't meet your rules. This helps provide a clear and positive shopping experience.

  • Alert Message: You can write a custom message that appears when a customer violates a rule. For example: "This item must be purchased in increments of 6."
  • Display Location: Choose where the message appears—on the product page, the cart page, or as a pop-up.

Step 6: Save and Activate

After configuring all the settings, click the "Save" or "Activate" button. The app will then apply the rule to your storefront.

Besides MinMaxify, Shopify also has many other apps that help you set up Shopify Quantity Rules easily. Below are a few apps you can refer to:

App Name

Best For

Key Features

Free Plan?

Minmaxify Order Limits

Simple quantity restriction needs

Minimum/maximum per product or order, by tag or type

OrderLogic ‑ Min & Max Limits

Stores managing individual product rules

Limits by variant, simple UI

KOR Order Limits Quantity

Wholesale and B2B shops

Enforce rules by customer group or product group

MinCart - Order limits

Enforcing cart-level rules

Minimum order amounts and quantities at cart level

Using Custom Liquid Code

This method is ideal for Shopify merchants who prefer full customization and control over their product quantity rules without relying on third-party apps. It’s best suited for store owners comfortable with Liquid coding and light JavaScript, or those working with a developer. 

Pros

Cons

  • Full control over quantity rules

  • No app dependency (cost-effective)

  • Lightweight, no impact on site speed

  • Requires coding knowledge

  • Manual setup and testing

  • Needs maintenance with theme updates

Here’s how to do it, step by step:

Step 1: Define the Rules with Metafields

Metafields let you store custom data on products—perfect for quantity settings like min, max, and increments.

  • Go to Shopify Admin > Settings > Custom Data > Products.
  • Click Add definition
  • Name it something like “Quantity Rules”.
  • For Namespace and key, use custom.quantity_rules.
  • Set the Content Type to JSON.

You’ll enter something like this for each product:

{

  "min": 2,

  "max": 10,

  "increment": 2

}

Once saved, scroll to any product in your admin. You’ll see the new "Quantity Rules" field—this is where you paste the JSON for that specific product.

This method gives you rule-level flexibility per product—without relying on third-party apps.

Step 2: Modify the Product Page Quantity Selector

Now it’s time to teach your product page how to read and use those rules.

  • Go to Online Store > Themes > Actions > Edit Code (use a duplicate theme for safety).
  • Under the Sections folder, open your product page file—usually main-product.liquid or product-template.liquid.

Locate the quantity input code. It might look like:

<input type="number" name="quantity" value="1" min="1" ... >

Just above that, paste this Liquid snippet:

{% assign quantity_rules = product.metafields.custom.quantity_rules %}

{% if quantity_rules %}

  {% assign min_qty = quantity_rules.min %}

  {% assign max_qty = quantity_rules.max %}

  {% assign increment_qty = quantity_rules.increment %}

{% else %}

  {% assign min_qty = 1 %}

  {% assign max_qty = 999 %}

  {% assign increment_qty = 1 %}

{% endif %}

Now update the quantity input to use your variables:

<input

  type="number"

  name="quantity"

  id="Quantity-{{ section.id }}"

  value="{{ min_qty }}"

  min="{{ min_qty }}"

  max="{{ max_qty }}"

  step="{{ increment_qty }}"

>

And don’t forget to inform your customer! Add this below the input field:

{% if quantity_rules %}

  <p>This product has a minimum order of {{ min_qty }}, a maximum of {{ max_qty }}, and must be ordered in increments of {{ increment_qty }}.</p>

{% endif %}

Now, your product page dynamically sets quantity rules based on the Metafield you created.

Step 3: Enforce Rules on the Cart Page

Here’s the kicker: customers can still bypass your rules by editing the cart or using direct URL hacks. To close that loophole, you’ll need to validate quantity rules in the cart too.

This part requires a bit of JavaScript magic:

  • Open your cart file—often main-cart-items.liquid or cart-template.liquid.

Find the checkout form, usually starting with:

<form action="/checkout" method="post">

Add a custom JavaScript script that:

  • Loops through each cart item
  • Retrieves quantity + associated Metafield rules (via data attributes or hidden inputs)
  • Validates: Is quantity ≥ min? ≤ max? A multiple of increment?
  • If anything’s off, blocks checkout and shows an error

This final step is highly theme-dependent. You may need to embed Metafield data into the DOM using data-* attributes, then parse and validate with JS.

Shopify Plus Scripts 

You may have heard of something called Shopify Scripts, and it is one of the most powerful tools that Shopify Plus has on this platform. They allow you to manipulate the behavior of checkout in ways that traditional stores cannot. And yes, it encompasses all of the quantity limitations, developing intelligent discounts, and even rules-based flying prices.

Let’s walk through how you can use Scripts to manage quantity rules like a pro.

What Are Shopify Scripts?

Scripts are small bits of Ruby code that run on the Shopify Plus checkout. They give you the power to:

  • Validate cart contents
  • Apply automatic discounts
  • Show custom messages or pricing
  • Set quantity conditions before checkout

And the best thing of all? The customers will think nothing of the magic, just a more seamless, more personalised experience when buying.

Use Cases

1. Enforce Quantity Limits at Checkout

Want to prevent customers from buying more than 5 units of a hot product? Or make sure wholesale buyers buy in increments of 10?

Here's how a Script could look: 

# Limit max quantity to 5 for a specific product

ProductId = 1234567890


Input.cart.line_items.each do |line_item|

  if line_item.variant.product.id == ProductId && line_item.quantity > 5

    line_item.change_line_quantity(5, message: "Maximum allowed quantity is 5")

  end

end


Output.cart = Input.cart

What it does: If someone adds 8 units, it silently adjusts it to 5 and shows a helpful message. Total control, no broken carts.

2. Auto-Discounts Based on Quantity Ranges

Want to offer “Buy 10, get 15% off” but without an app? Scripts make this easy.

Input.cart.line_items.each do |line_item|

  if line_item.quantity >= 10

    line_item.change_line_price(line_item.line_price * 0.85, message: "15% off for bulk purchase!")

  end

end


Output.cart = Input.cart

This is perfect for volume-based incentives that only trigger if the customer hits your quantity thresholds.

Why Scripts Are Ideal for High-Volume & Wholesale Stores

Shopify Scripts shine brightest when:

  • You manage B2B or wholesale customers
  • You need tiered pricing, bulk restrictions, or exclusivity
  • You need to localize sophisticated checkout logic that does not depend on third-party software
  • You run high-traffic campaigns and need quantity enforcement at scale

Unlike frontend edits or apps, scripts run at the checkout level, so users can’t bypass them—even if they tinker with the cart or product pages.

Built-In Shopify Quantity Rules: What You Can (and Can’t) Do Natively

Shopify Quantity Rules

Shopify’s built-in features offer only basic quantity control, like inventory tracking and creating “pack” variants, but they don’t support true quantity rules such as minimums, maximums, or purchase increments. You can’t natively enforce limits or show error messages when rules are broken—those require apps, theme edits, or Shopify Plus scripts. At best, native workarounds like manual messaging or slight theme tweaks can help, but they lack real enforcement.

Before you go hunting for apps or diving into code, let’s clear the air: Shopify does not natively support advanced quantity rules like minimum/maximum purchase limits or specific quantity increments. But that doesn’t mean you’re completely out of options.

Shopify’s native limitations regarding quantity restrictions.

What You Can Do Natively in Shopify

Shopify does offer a few basic quantity-related settings right from your product admin:

  • Inventory tracking: You can limit the total stock available for sale.
  • Limit purchase to 1 per customer (sort of): You can manually write this into your product description or title (e.g., “Limit 1 per customer”), but Shopify won’t enforce this behavior on its own.
  • Use variants to group quantities: A semi-hack—some merchants create product variants like “Pack of 5” or “Pack of 10” to simulate quantity control, but it’s clunky and not dynamic.

What You Can’t Do Without Workarounds

Here’s what Shopify won’t let you do out of the box:

  • Enforce minimum purchase quantities
  • Block customers from exceeding a maximum 
  • Require purchasing in set increments (e.g., only 2, 4, 6… not 3 or 5)
  • Apply quantity limits per customer tag or account
  • Automatically show error messages when rules aren’t followed

That’s where apps, Liquid code edits, and Shopify Plus scripts come in.

Workarounds You Can Try (If You’re Not Using Apps or Plus)

If you’re not ready to commit to an app or a developer, here are a few creative-but-limited workarounds:

  • Manual messaging: Add a bold note in your product description like “Must order at least 3 units. Orders under 3 will be canceled.” It won’t prevent customers from adding fewer items, but at least you’ve set expectations.
  • Theme customizations: Some themes allow minor logic changes using Shopify’s Liquid templating language. For instance, you can pre-fill the cart with a default quantity or conceal the "Add to Cart" button until a particular quantity is chosen.
  • Shopify Plus scripts: If you're a Plus merchant, you can write checkout scripts that actually enforce rules in real time. (More on that in Section II.3.)

Shopify Quantity Rules vs. Volume Pricing vs. Bundles

Shopify Quantity Rules control how much a customer can or must buy, while Volume Pricing incentivizes larger orders with discounts, and Bundles group products into single purchasable units to boost average order value. Each serves a different goal—use quantity rules for strict control, volume pricing for flexible incentives, and bundles for curated product experiences.

Feature

Quantity Rules

Volume Pricing

Product Bundles

What it does

Sets purchase limits or requirements

Offers discounts based on the quantity purchased

Group multiple products into a single purchasable unit

Main Goal

Control how much a customer can or must buy

Encourage larger orders through financial incentives

Increase AOV and cross-sell related items

Examples

- Must buy at least 3

- Limit 1 per customer

- Buy in multiples of 5

- Buy 5+, get 10% off

- Buy 10+, get 20% off

- Buy a skincare set

- Bundle 3 t-shirts at a fixed price

Native Shopify support

❌ (requires apps, code, or Shopify Plus scripts)

✅ (with Shopify’s automatic discounts or Shopify Plus)

✅ (basic bundling possible, but enhanced with apps)

App required?

Usually yes

Optional (built-in tools exist, more powerful with apps)

Optional, but apps provide better UX and inventory sync

Best for

- Wholesale stores

- Flash sales- Limited inventory

- Subscription models

- B2B pricing tiers

- Clearance stock

- Gifting

- Product kits

- Seasonal promotions

Limitations

- No enforcement unless app/script is used

- Can get complex to manage

- Stackable discounts may conflict

- Inventory sync issues if not using apps

When to use each strategy

  • Use Quantity Rules when you need strict purchase controls—like minimum order quantities for wholesale or max limits during product drops.
  • Use Volume Pricing when your goal is to encourage bulk purchases through discounts without forcing customers.
  • Use Bundles when you want to sell complementary products together or create curated experiences (like gift sets or starter kits).

You can even combine these strategies for better results. For example: Offer a bundle that requires a minimum quantity and gives a volume discount—perfect for wholesale or BFCM campaigns.

Common Issues When Setting Shopify Quantity Rules & How to Fix Them

Common issues with Shopify quantity rules include enforcement failures on certain themes, conflicts between quantity and discount apps, unclear rule messaging, and inconsistent behavior across devices. Fixes range from adding validation directly in the cart, consolidating logic into one app or Shopify Scripts, clearly displaying rules to customers, and thoroughly testing across devices and browsers.

1. Quantity rules are not being enforced on certain themes

The Problem: You’ve set rules using an app or custom Liquid code, but customers can still check out with invalid quantities, especially on older or heavily customized themes.

Why It Happens: Apps or custom code often inject quantity logic into product pages. If your theme has non-standard code (custom cart forms, AJAX carts, etc.), the logic might not “hook” into those areas.

How to Fix:

  • Check if your theme uses a custom cart drawer or quick-add buttons.
  • Switch to the default Shopify cart page and test again.
  • If you're using an app, make sure it’s compatible with your theme version or reach out to support for assistance.
  • Add validation logic directly in the cart page using JavaScript (or have a developer do it).

2. Conflicts between quantity rules and discount or cart apps

The Problem: Your quantity rule works… until a discount app steps in and overrides everything.

Why It Happens: Multiple apps might be trying to control the cart at once—leading to conflicts. One app might allow any quantity to apply a discount, while another restricts it.

How to Fix:

  • Use one app for all cart-related logic whenever possible.
  • Check your app documentation for compatibility notes—some apps like EcomRise, MinMaxify, or Advanced Quantity offer settings to work alongside Shopify’s automatic discounts.
  • If you're using Shopify Scripts (Plus), consider consolidating logic there for full control over quantity rules and discounts at checkout.

3. Customers ignore quantity rules because they’re not obvious

The Problem: You’ve set the rules, but customers are still checking out wrong, then messaging you in confusion.

Why It Happens: The quantity rule might be technically enforced, but it’s not communicated clearly on the product or cart page.

How to Fix:

  • Display inline messages or alerts on product pages (e.g., “Please order in multiples of 5.”).
  • Use popups, banners, or cart warnings if rules aren’t met.
  • Modify quantity input fields so customers can only select allowed numbers (e.g., using dropdowns or buttons instead of a text field).
  • Highlight quantity rules in your FAQs or shipping policy pages.

4. Inconsistent behavior across devices or browsers

The Problem: The quantity rules work fine on desktop… but break on mobile.

Why It Happens: Theme responsiveness or JavaScript logic might not behave consistently across devices. Some apps also load differently based on screen size.

How to Fix:

  • After establishing rules, test your store across a variety of browsers and devices.
  • Use Shopify’s theme preview mode and inspect responsiveness.
  • Avoid relying purely on client-side validation; use server-side rules where possible (or leverage Shopify Plus scripts if available).

Frequently Asked Questions

1. Can I set Shopify quantity rules without using an app?

Yes, but with limitations.

You can use custom Liquid code to pre-fill product quantities or restrict add-to-cart actions on the product page. However, this won’t prevent someone from manually changing the quantity in the cart or using a custom script. To truly enforce rules across the customer journey (especially at checkout), you’ll need either a Shopify app or Shopify Plus Script Editor.

2. What app is best for tiered pricing or quantity breaks?

Some of the most popular Shopify apps for tiered pricing and quantity-based discounts include:

  • EcomRise: Upsell & Bundles (Great all-in-one solution)
  • Discounted Upsells – Booster Apps
  • Volume & Tiered Discounts – Shopacado
  • Quantity Breaks – HulkApps
  • Bold Custom Pricing – Bold Commerce

Each has its strengths, depending on whether you want to enforce limits, offer discounts, or display pricing tables.

3. How do I enforce Shopify quantity rules for specific customer tags?

If you're on Shopify Plus, you can use checkout scripts to apply quantity rules to customers based on tags (like “wholesale” or “VIP”).

For non-Plus merchants, some advanced quantity rule apps allow customer-based conditions.

  • Example: Only allow customers with the tag “B2B” to purchase in increments of 10.

Make sure the app you choose supports segmentation or customer tagging features.

4. Can I apply different quantity rules to variants?

Yes, many apps support setting rules per variant, not just per product. This is helpful if you sell, say, T-shirts where one size must be ordered in sets of 2, but another has no limit.

If you're using Liquid code, you'll need to write logic that checks the variant.id or variant.title before allowing a quantity change.

5. Do quantity rules work during sales and discounts?

They can, but test carefully. Some discount apps or Shopify’s automatic discounts might conflict with quantity-based restrictions, especially if both are modifying the cart at the same time.

Best practices:

  • Use one app to handle both quantity rules and volume discounts, if possible.

  • If using Shopify Plus, centralize logic in Scripts to avoid conflicts.

  • Always test discounts + quantity rules together before going live.

Final Thoughts

Quantity rules might seem like a small detail, but they can have a huge impact on how you manage inventory, serve different customer types, and increase average order value. From flexible apps like EcomRise to clever Liquid workarounds and Shopify Scripts for the power users out there, you have options, lots of them. If you're ready to start implementing quantity rules in your store, go ahead and bookmark this guide or share it with your developer or store manager.

Table of content

Oct_2025-_Sidebar_banner
The4_BFCM
enUS__1x3MonthsPromo_Static_banner_768x1024_c2_V2
EcomRise_Banner_on_Blog_Posts

Related posts

reconvert Shopify post purchase upsell

ReConvert Shopify App Review: Features, Pricing Comparison

ReConvert, or Upsell.com, is often recommended by Shopify merchants, and they believe it is quite useful in...
Read More
shopify limit quantity per customer

Simple Guide to Limit Purchase Quantity Per Customer On Shopify

To limit the quantity per customer on Shopify, use a dedicated Shopify app from the Shopify App...
Read More
How to Add a Free Gift to Your Shopify Store- 2025 Ultimate Guide

How to Add a Free Gift to Your Shopify Store- 2025 Ultimate Guide

Hey there, Rainy here from EcomRise.  For any Shopify merchant in 2025 looking to drive serious growth,...
Read More
How to Add a Shopify Thank You Page Upsell to Boost AOV After Checkout

How to Add a Shopify Thank You Page Upsell to Boost AOV After Checkout

A Shopify thank you page upsell is a powerful way to boost average order value (AOV) after...
Read More
Shopify Favicon Cart Count Apps

Top 6 Shopify Favicon Cart Count Apps to Reduce Abandonment

Top Shopify favicon cart count apps include EcomRise (feature-rich, free option), Vitals (all-in-one with 40+ tools), and...
Read More
Shopify Minimum Order Quantity Apps

8 Best Shopify Minimum Order Quantity Apps to Increase AOV

Top Shopify minimum order quantity apps include OC Quantity Breaks Order Limit (flexible rules and tiered discounts),...
Read More
ecom-no-replace-ou3dQEvvpTlogo-ft

Unlock More Revenue with EcomRise. 
Start Using It For free!

© 2025 EcomRise. All rights reserved.