Skip to content
Setup

How to Set Maximum Order Quantity for Shopify Products

3 min watch + 4 min read

Step-by-step guide to limiting how many units a customer can buy per product on Shopify. Set up maximum quantity rules with checkout validation using Nex MOQ.

What you’ll learn

This guide shows you how to limit how many units of a product a customer can order. By the end, you’ll have a working maximum quantity rule that blocks over-ordering at checkout.

  • How to create a maximum quantity rule for specific products
  • Setting the maximum number of units a customer can buy
  • How checkout validation blocks orders that exceed your limit
  • Customizing the error message customers see when they order too many

Step 1: Install Nex MOQ

  1. 1

    Find the app — search “Nex MOQ” in the Shopify App Store, or go directly to the app listing.

Nex MOQ app listing in the Shopify App Store
The Nex MOQ app listing in the Shopify App Store
  1. 2

    Click “Add app” and approve the permissions. The app needs access to your products and checkout to enforce rules.

  2. 3

    Open the app from your Shopify admin sidebar. You’ll see the main dashboard with all available rule types.

Nex Checkout Validator dashboard showing all rule types including Product Max Quantity
The dashboard lists all rule types -- select 'Product Max Quantity' to limit how many units customers can order

Step 2: Create a maximum quantity rule

  1. 1

    Click “Product Max Quantity” from the rule type list on the left.

  2. 2

    Set the maximum value — enter the maximum number of units a customer can order. For example, enter “20” to cap orders at 20 units per product.

  3. 3

    Select your products — click “Select Products” to choose which products this limit applies to.

Setting maximum quantity to 20 for The Collection Snowboard: Hydrogen
Set the maximum to 20 units and select the product this rule applies to
  1. 4

    Configure the error message — toggle “Use custom message” to write your own, or keep the auto-generated message. The default message clearly tells customers the limit: “You cannot add more than 20 of The Collection Snowboard: Hydrogen to your cart.”

Error message configuration with custom message toggle and auto-generated message
Toggle custom messages or use the auto-generated message that includes the product name and limit
  1. 5

    Save the rule — click Save. Your maximum quantity rule is now active on both the cart page and at checkout.

Tip: You can add multiple products to the same rule, or create separate rules with different limits for different products. Use “Add Maximum Quantity Limit” to add more product-limit pairs within the same rule.

Step 3: How it looks on your store

Once the rule is active, here’s what happens when a customer tries to order more than your maximum:

  1. 1

    Customer browses your product — they can add items to cart normally from the product page.

Shopify product page for The Collection Snowboard: Liquid
Customers browse and add products to cart as usual
  1. 2

    Cart shows the items — even if they add more than the maximum, the cart page displays their items. The validation happens at checkout.

Cart drawer showing 30 units of a product that has a maximum limit of 20
The cart shows items even when quantities exceed the limit -- validation happens at checkout
  1. 3

    Checkout blocks the order — when the customer reaches checkout with more than the allowed quantity, they see a clear error message and cannot complete the purchase.

Checkout page showing error: You cannot add more than 20 of The Collection Snowboard: Hydrogen to your cart
The checkout validation blocks the order and shows exactly what the limit is
  1. 4

    Customer adjusts and completes — once they reduce the quantity to 20 or below, checkout proceeds normally.

Checkout page with reduced quantities within the maximum limit, order can proceed
After reducing quantities to within the limit, checkout proceeds normally

Why checkout validation matters: Cart-page-only solutions can be bypassed through direct checkout links, buy buttons, and Shop Pay. Checkout validation is the only way to truly enforce your maximum quantity limits.

Common use cases for maximum quantity

  • Limited edition products: Prevent hoarding by capping how many units one customer can buy.
  • Sample or trial products: Limit free or discounted samples to a reasonable quantity per customer.
  • Fair distribution during high demand: Ensure more customers can purchase during launches or sales events.
  • Regulated products: Comply with legal limits on quantities for certain product categories.

Summary

Setting up maximum order quantity limits on Shopify takes about 2 minutes with Nex MOQ. No code, no theme editing, and your limits are enforced at the actual checkout — not just as a suggestion on the cart page.

Related features

Further reading

Share this guide

N

Nex MOQ Team

We build order limit tools for Shopify merchants. Our guides are written by Shopify experts who help thousands of stores manage minimum and maximum order rules.

Ready to enforce order limits?

Start your free trial. No code required. Works on all Shopify plans.

Plans from $9.99/month after free trial · Free for dev stores