LeDuc Systems

Quantity limits after Shopify Scripts

I'm Tyler, and I make LeDuc Order Limits. If you used Shopify Scripts or a theme setting to hold quantity rules in place, those rules need a new home now that Scripts stopped running on June 30, 2026. The Functions way is a cart and checkout validation that checkout itself enforces.

What the Script approach looked like

Line item scripts changed prices and discounts in the cart. They could not return an error that stops an order. So a quantity rule built around Scripts was indirect: a discount that only applied up to a quantity, plus a limit on the theme's quantity box. Buy it now, express checkout buttons and edited carts could get past the theme part.

The Functions way

Shopify's Cart and Checkout Validation API lets an app check the cart when the shopper goes to check out. If a line is under the minimum, over the maximum or not a multiple of the case size, the function returns a message and Shopify's checkout won't place the order until the cart is fixed. It runs in checkout, so it holds on every theme and with Buy it now and express checkout.

If you are on Shopify Plus and have a developer, you can write this function in a custom app. On any plan, you can install a public app that contains one.

With LeDuc Order Limits

  1. Install the app. The checkout rule switches on automatically.
  2. Click Create limit rule. Set a minimum, a maximum or "sold in multiples of" (for example cases of six).
  3. Choose what it applies to: products, specific variants, collections, tags, vendors or all products. Optionally apply it only to, or to everyone except, customers with a tag, such as wholesale.
  4. Optional: add whole-order limits on item count, subtotal or weight, or cap the items in total from a collection.
  5. Edit the messages shoppers see. Optional: turn on the app embed to show the limit by the quantity box on product pages.

Script rules and where they go

Rule you hadIn LeDuc Order Limits
Max N per productA limit rule with a maximum. All variants of the product count together.
Max N of one variantA rule for specific variants.
Minimum order quantityA rule with a minimum, or a whole-order minimum item count.
Sell in cases or packs"Sold in multiples of".
Minimum order valueA whole-order minimum subtotal.
Different limits for wholesale customersA rule limited to, or excluding, customers with a tag.
Max N per customer across all ordersNot covered. Limits are per order.

More detail: LeDuc Order Limits, how to limit quantity per order on Shopify and how it compares with MinMaxify.

Status, November 2026: my Shopify apps are in Shopify App Store review and not installable yet. Each app's page will link to its App Store listing once it is approved.

Back to all Shopify Scripts replacements. Questions? Email me at tyler@leducsystems.com.

FAQ

Can a Shopify Function block checkout when a quantity limit is broken?
Yes. A cart and checkout validation function returns an error, and Shopify's checkout won't place the order until the cart is fixed.
Does it work with Buy it now and express checkout?
Yes. The check runs in Shopify's checkout, not in the theme, so Buy it now, express checkout buttons and edited carts get the same check.
Are limits per order or per customer?
Per order. LeDuc Order Limits checks each cart and checkout; it does not track how much one customer has bought over time.
Do I need Shopify Plus?
No. Stores on any plan can use public App Store apps that contain functions. Only custom apps with functions need Plus.

Sources: Shopify developer changelog, Shopify Scripts will be deprecated on June 30, 2026; Shopify Help Center, Transitioning from Shopify Scripts to Shopify Functions; Shopify developer docs, Function APIs. Read on 2026-11-07.