quantity_rule
Available as variant.quantity_rule. The object is always present: min
defaults to 1, max is nil when there is no configured maximum, and the
current Sellerlane catalog contract always exposes increment = 1.
Quantity input
{% assign rule = variant.quantity_rule %}<input type="number" name="quantity" min="{{ rule.min }}" step="{{ rule.increment }}" {% if rule.max %}max="{{ rule.max }}"{% endif %}>For the default rule, the effective values are:
min = 1max = nilincrement = 1For a rule with min = 5, max = 100, and the current increment = 1, valid
line quantities are the integers from 5 through 100.
Validate with the form tag
{% assign variant = product.selected_or_first_available_variant %}{% assign rule = variant.quantity_rule %}
{% form 'product', product %} <input type="hidden" name="id" value="{{ variant.id }}"> <input type="number" name="quantity" value="{{ rule.min }}" min="{{ rule.min }}" step="{{ rule.increment }}" {% if rule.max %}max="{{ rule.max }}"{% endif %} > <button type="submit">Add to cart</button>{% endform %}HTML attributes improve the buyer experience, but the cart backend remains
authoritative for configured minimum and maximum order quantities, including
requests submitted without this HTML. Sellerlane does not yet persist or
validate a custom increment; do not document or render a step other than the
Drop’s current value of 1.
Quantity rules are universal catalog rules in Sellerlane. B2B catalog-specific quantity contexts are intentionally unavailable.
Properties
| Property | Description |
|---|---|
quantity_rule.increment | Current purchase step; always 1 until catalog and cart APIs support custom increments. |
quantity_rule.max | Maximum purchasable quantity, or nil when there is no maximum. |
quantity_rule.min | Minimum purchasable quantity. |
Property list is generated from the storefront engine (QuantityRuleDrop), so it always matches what your theme can use. Use {{ variant.quantity_rule | json }} only as a curated debug snapshot; it can omit lazy or otherwise public properties.