App GuideCart & Checkoutv1.0

Quantity Limit — Complete Guide

Learn how to install, configure, and use Quantity Limit. This guide covers min/max purchase limits, Shopify Functions checkout enforcement, customer tags, lifetime caps, scheduled rules, and subscription product support.

March 09, 2026 9 min read

Overview

Quantity Limit lets you set minimum and maximum purchase quantities per product, enforced at checkout using Shopify Functions. Limits are validated server-side, so customers cannot bypass restrictions by editing cart quantities or using scripts.

Key capabilities:

  • Min/max quantity limits per product or variant
  • Server-side enforcement via Shopify Functions
  • Customer tag-based rules (wholesale vs retail)
  • Per-customer lifetime purchase caps
  • Scheduled rules with auto-activation
  • Subscription product support
Server-Side Enforcement

Unlike JavaScript-only solutions, Quantity Limit uses Shopify Functions to validate limits at checkout. This means limits are enforced server-side and cannot be bypassed by customers editing cart quantities or using browser scripts.

Installation

1

Install from Shopify App Store

Search for "Quantity Limit" in the Shopify App Store, or use the direct install link from the PantherCodX website. Click Add app to begin.

2

Authorize Permissions

The app requests the following permissions:

  • Read products — to identify products and variants for limit rules
  • Read customers — to support tag-based and lifetime cap rules
  • Read/write checkout — to enforce limits via Shopify Functions

Click Install app to grant access.

3

Activate Shopify Function

After installation, the app automatically registers its Shopify Function for checkout validation. Go to Settings > Checkout in your Shopify admin to verify the function is active under "Additional scripts and functions."

Creating Limit Rules

1

Basic Min/Max Limits

Set simple quantity limits on any product or variant:

  • Go to Create Rule > Basic Limit
  • Select the target product(s) or variant(s)
  • Set the minimum quantity (e.g., must buy at least 2)
  • Set the maximum quantity (e.g., cannot buy more than 10)
  • Add a custom error message for when limits are exceeded
2

Customer Tag-Based Rules

Set different limits for different customer segments:

  • Go to Create Rule > Tag-Based
  • Specify the customer tag (e.g., "wholesale", "vip")
  • Set different min/max limits for tagged customers
  • Example: minimum 10 units for wholesale customers, max 5 for retail
3

Per-Customer Lifetime Caps

Limit the total quantity a single customer can purchase across all orders:

  • Go to Create Rule > Lifetime Cap
  • Select the target product(s)
  • Set the maximum lifetime quantity per customer
  • The app tracks purchase history and blocks checkout when the cap is reached

Ideal for limited editions, promotional items, or preventing reseller abuse.

4

Scheduled Rules

Set time-based rules that automatically activate and deactivate (Pro plan):

  • Go to Create Rule > Scheduled
  • Set a start date and end date for the rule
  • The rule automatically activates at the start time and deactivates at the end time
  • Useful for flash sales, seasonal limits, or promotional periods

Plans & Limits

Free Plan:

  • Up to 3 products/variants with full checkout enforcement
  • Basic min/max limits
  • Perfect for stores that only need to limit a few key items

Pro Plan:

  • Unlimited products and variants
  • Customer tag-based rules
  • Per-customer lifetime caps
  • Scheduled rules with auto-activation
  • Priority support

Subscription Products

You can set quantity limits on any product type, including subscription boxes. Combined with per-customer lifetime caps, you have full control over purchase quantities for recurring orders.

The app recognizes subscription selling plans and applies limits accordingly.

Troubleshooting

Limits not enforcing at checkout?

  • Verify the Shopify Function is active in Settings > Checkout
  • Check that the rule is set to "Active" in the app dashboard
  • Ensure the product/variant is correctly assigned to the rule
  • Test with a fresh cart in an incognito window

Customer seeing wrong limit?

  • Check if the customer has tags that match a tag-based rule
  • Tag-based rules take priority over general rules
  • Review the rule priority order in the app dashboard

Lifetime cap not counting correctly?

  • Lifetime caps track purchase history from the date the rule was created
  • Cancelled and refunded orders are still counted (by default) — check Settings to change this
  • Guest checkouts are tracked by email address

Scheduled rule not activating?

  • Ensure the start/end dates use your store's timezone
  • Check that the rule is not paused in the dashboard
  • Scheduled rules require the Pro plan