Quantity rules
ProProductBest as a block in Product informationv1.0.0
Stop rejected carts and confused buyers. The picker reads each variant's quantity rules from Shopify (minimum, maximum and increment, set in B2B catalogs) and only steps through amounts Shopify will accept. Buyers can order by the unit, by the case or by the pallet, with pack sizes from your settings or from a product or variant metafield, and always see how many units that is. Type an amount that doesn't fit and it suggests the nearest valid ones. Prices follow the buyer's volume price breaks. On the product page it sets your product form's quantity, so your Add to cart buys it; anywhere else it adds through Shopify's standard cart actions.
Good for: Wholesale and B2B product pages · Selling by the case or pallet · Minimum order quantities

When to use it
Use it on product pages for wholesale and B2B buyers, right beside the price and Add to cart, in place of your theme’s quantity field.
- No rejected carts. The picker reads each variant’s minimum, maximum and increment from Shopify and only steps through amounts Shopify accepts. If a buyer types an amount that doesn’t fit, it suggests the nearest valid ones.
- Order by the case or pallet. Buyers can count in units, cases or pallets, and always see how many units that is.
- The price at a glance. It shows the unit price and the total, following the buyer’s volume price breaks.
Set it up
Add it beside Add to cart
This section is best as a block in Product information: open your product template, select Product information, choose Add block and pick SU: Quantity rules. See Sections beside Add to cart, which also covers themes without theme blocks (there you choose Add section instead).
On a product page it uses that page’s product. Elsewhere, for example in a featured product section, pick one under Product.
Set the order rules in Shopify
The minimum, maximum and increment come from the quantity rules in your Shopify B2B catalogs. You don’t enter them in the section. Buyers who aren’t covered by a catalog with quantity rules can order any amount from 1.
If you track inventory for a variant and don’t let it sell when out of stock, the stock count also caps the amount buyers can choose.
Name your units
Fill in Unit (one) and Unit (many), for example bottle and bottles. These words show next to the quantity and in the totals.
Set up your packs
The first pack is a case by default: Pack (one) and Pack (many) are case and cases, and Units per pack is 12. Change them to match how you ship, or clear Units per pack for no pack.
If pack sizes differ from product to product, store them in an integer metafield on the variant or the product and
enter its namespace.key in Units per pack metafield. It’s set to custom.case_qty by default. When a product
has a value there, it replaces Units per pack; a variant’s value comes before the product’s. Clear the field to
always use the number.
For a second, larger pack, fill in Large pack (one), Large pack (many) and Units per large pack (or Units per large pack metafield). It’s off until you enter a size.
A pack is only offered when it fits the variant’s rules: its size must be a multiple of the increment and stay within the maximum. When a pack doesn’t fit, the theme editor shows a note explaining why.
Choose what buyers start with
Buy by, at first picks whether the picker opens on Unit, Pack or Large pack. If that pack doesn’t fit the variant’s rules, it starts on the unit.
Work with your theme’s form
On the product page, the picker sets your product form’s quantity, so your theme’s Add to cart buys the amount. Keep Hide the product page’s own quantity on so buyers don’t see two quantity fields; the hidden one keeps working.
Off the product page, the section has its own option picker and Add to cart button. Turn off Show add to cart button if another Section Universe block for the same product should carry the button.
Choose what shows
Under Display, Show order rules lists the minimum, increment and maximum. With it on, Show stock count also shows how many are in stock. Show price and total shows the unit price, the total and the price per pack. Placed as a section, Look chooses between Blend with the theme and Card.
Quantity rules and volume prices belong to B2B catalogs, so buyers only get them when they’re signed in to a company account that has the catalog. To check the picker with your rules, sign in to your store as one of those customers.

Try it
Settings
In the theme editor, in the order you'll see them. Every section also has the heading and style settings.
Quantity
| Setting | What it does |
|---|---|
| ProductProduct | Leave empty on product pages to use the page's product. |
| Show add to cart buttonCheckbox | Off the product page it buys on its own. With several Section Universe blocks for one product in a section, one button shows: the last one switched on. On the product page your theme's button is used. |
| Hide the product page's own quantityCheckbox | On the product page this sets your product form's quantity; hiding the theme's field avoids two. It keeps working out of sight. |
Units and packs
| Setting | What it does |
|---|---|
| Unit (one)Text | |
| Unit (many)Text | |
| Pack (one)Text | |
| Pack (many)Text | |
| Units per packNumber | Leave empty for no pack. |
| Units per pack metafieldText | namespace.key of an integer metafield on the variant or product. When set, it replaces the number above. |
| Large pack (one)Text | |
| Large pack (many)Text | |
| Units per large packNumber | Leave empty for no large pack. |
| Units per large pack metafieldText | namespace.key of an integer metafield on the variant or product. |
| Buy by, at firstDropdown | Falls back to the unit when the pack doesn't fit the order rules. |
Display
| Setting | What it does |
|---|---|
| Show order rulesCheckbox | |
| Show stock countCheckbox | Stock always limits the amount buyers can choose; this also shows the count. |
| Show price and totalCheckbox | |
| LookDropdown |
Good to know
- Quantity rules come from Shopify B2B catalogs; for buyers without them every amount from 1 is valid.
- A pack is offered only when its size fits the variant's rules (a multiple of the increment, within the maximum).
- Pack sizes from metafields need an integer metafield (for example custom.case_qty) on the variant or product.
- Off the product page (for example in a featured product section) it has its own option picker and Add to cart, separate from the theme's.
- Without JavaScript buyers enter the number of units in a field limited to the order rules, and the form adds it to the cart.
Changelog
- 1.0.0: Initial release.