quantity_ rule
A variant order quantity rule.
If no rule exists, then a default value is returned.
This rule can be set as part of a B2B catalog.
Note
The default quantity rule is min=1,max=null,increment=1
.
{
"min": 5,
"max": 100,
"increment": 5
}
{
"min": 5,
"max": 100,
"increment": 5
}
Anchor to The variant order quantity rule
The variant order quantity rule
{{ product.variants.first.quantity_rule }}
{{ product.variants.first.quantity_rule }}
{
"product": {
"variants": [
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
},
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
},
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
},
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
},
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
},
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
},
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
},
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
},
{
"quantity_rule": {
"min": 1,
"max": null,
"increment": 1
}
}
]
}
}
Output
{"min"=>1, "max"=>nil, "increment"=>1}
Was this section helpful?