High-volume catalogue merchant
Per-product minimum order quantities across a 40,000-product catalogue
A per-product minimum order quantity for a 40,000-product store — stored as a metafield, enforced at the cart, and editable in bulk by CSV, where Shopify Functions could not scale.
- Client
- High-volume catalogue merchant
- Industry
- High-volume retail
- Timeline
- Custom build
- Services
- Custom Shopify build, Cart and checkout logic, Bulk data tooling
The challenge
A store with almost 40,000 products needed a minimum order quantity on each one — and they varied widely (2, 4, 10, 20, 100, 300…). Shopify Functions caps out at 25 rules and a limited rule size, so a native rule-based approach could never cover a catalogue this size.
A merchant came to us with a catalogue of almost 40,000 products, and one requirement: each product needed its own minimum order quantity. Not one blanket rule — the minimums varied enormously from product to product: some 2, some 4, others 10, 20, 100, even 300.
Why the native route did not fit
We started where we always do — with what Shopify gives you out of the box. A minimum order quantity can be built with Shopify Functions, and for a small store it is the right tool.
But Functions is built around a bounded set of rules, not a per-product value on tens of thousands of items. In practice you hit two hard walls:
- A maximum of 25 rules — nowhere near enough for 40,000 products with individual minimums.
- A rule-size / character limit (a rule’s configuration is capped) — you cannot pack a 40,000-entry lookup into it.
There was simply no way to express “a different minimum on each of 40,000 products” inside those limits. So we went custom.
The custom solution
We moved the minimum off the rule engine and onto the product itself, as a metafield. Every product carries its own minimum-quantity value, and our logic reads that metafield and checks it against the quantity in the cart. If the quantity is below the product’s minimum, the customer sees a clear message and cannot proceed until they meet it.
Because the limit lives on the product, there is no ceiling — 40,000 products, 40,000 independent minimums, no 25-rule wall.
Making 40,000 products manageable
A per-product value is only useful if the team can actually maintain it at scale — nobody is editing 40,000 products by hand. So we built the bulk workflow to match:
- Download a CSV, set the minimum for each product right in the sheet, and import it back.
- The import writes each value straight to the product’s metafield (structured as a multi-line / list metafield object), so thousands of limits can be set or changed in one pass.
The result
A minimum order quantity that behaves exactly as the merchant needed on every one of their 40,000 products — enforced at the cart, and fully manageable by the team through a spreadsheet, with no developer in the loop for day-to-day changes. Where the platform’s native limits stopped, a simple metafield-and-CSV design carried it the rest of the way.
Next case study
Keeping subscription and one-time carts separate across 15 Juice Plus stores
Ready to build a store worth talking about?
Tell us where your store is today and where you want it to go. We reply within two working days with a clear next step.