Skip to content
Esc

Start typing to search the docs.

On this page
How-to Updated Aug 16, 2026

Lock the quantity selector

Control which quantities customers can select on the product page. Add the required quantity value to the product metafield, enable the app embed, and turn on "Allow bulk limit" in Nex Validator. Example: if the minimum quantity is 5, the quantity selector can prevent customers from selecting less than 5.

Applies to
  • Premium plan
  • Online Store 2.0 themes with the app embed enabled
Doesn't apply to
  • Products without the metafield
  • Checkout — that layer works independently
Not sure how the two layers differ? Read this first

Checkout blocking stops an invalid order at checkout. Locking the quantity selector helps earlier by preventing customers from choosing an invalid quantity on the product page.

Before you start

Make sure you have:

  • The Premium plan.
  • The Nex Validator app embed enabled and the theme saved — see install.
  • The product you want to control and the quantity rule you want to use. Example: Minimum Quantity = 5.

The three rule types

The quantity rule is stored on each product in one metafield called Checkout Rule (checkout_ninja.rule, type Multi-line text), written as a JSON value. Setup is covered step by step in Product bulk limit.

TypeWhat it meansExample value
min_quantityLowest quantity the customer can select{"value":5,"type":"min_quantity"} → customer cannot select below 5
max_quantityHighest quantity the customer can select{"value":10,"type":"max_quantity"} → customer cannot select above 10
multiple_ofCustomer must order in multiples of this number{"value":6,"type":"multiple_of"} → 6, 12, 18, 24…

Steps

1. Install Nex Validator

If Nex Validator is not installed yet, install it from the Shopify App Store and approve the required permissions. If it is already installed, skip to the next step.

2. Open the Shopify theme editor, enable the Nex Validator app embed, and click Save.

3. Open the product you want to control. Under Product metafields, find Checkout Rule and enter the JSON value. Example: for a minimum of 5, enter {"value":5,"type":"min_quantity"} and save the product.

4. Open or create a rule in Nex Validator and turn on Allow bulk limit.

5. Make sure the rule is Enabled, then save your changes.

Verify it worked

  1. Open the product on your storefront.
  2. Try selecting a quantity that breaks your metafield rule.
  3. Confirm that the quantity selector prevents the invalid quantity. For example, if Minimum Quantity = 5, confirm that customers cannot select a quantity below 5.
  4. Test checkout as well to confirm the order is blocked if the rule is broken.

If your theme does not respond

If the quantity selector is not working, first check that:

  • The app embed is enabled and the theme is saved.
  • The product has the correct metafield value.
  • Allow bulk limit is enabled.

If all three are correct but the quantity selector still does not follow the rule, your Shopify theme may handle quantity selectors differently. Check the theme-related settings or contact support.

Frequently asked

Does this replace the checkout rule?

No, and it should not. The storefront lock runs in the browser and can be bypassed. Keep a checkout rule underneath it.

My theme ignores the lock.

Themes render quantity inputs differently. Check the app embed is enabled and saved, then confirm the metafield is on the product you are testing.

Can I set the metafield in bulk?

Yes — Shopify's bulk editor or a CSV import. Setting it product by product does not scale past a handful.

See also: How enforcement works · Product bulk limit · Install and enable the app embed