New Shopify Certification now available: Liquid Storefronts for Theme Developers

Liquid object quantity_rule?

Shopify Partner
29 0 6

According to docs, Liquid offers a quantity_rule object, with 3 properties: min, max, increment.

I'm curious where are these properties pulled from, where should they be stored so Liquid can pull them and offer them to the front end.

They seem to be connected to the variant object, but on the back end the ProductVariant object doesn't have that field.

Thanks for any assistance.

Replies 6 (6)
Shopify Partner
3787 710 1102

Hi @newbie_01 


Interesting. This seems to be new. You can use the following rule to set up the product variant quantity. I believe this is something to do with the changelog in Shopify. You can see this code being use in the Shopify FREE themes, inside the main-product.liquid under the Section folder. 




Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!
Shopify Partner
29 0 6


Yes, the code in the theme looks very promising, but I can't find where is the actual data (min,max,increment) stored for each variant.

Good find on that changelog entry. It mentions catalogs. I tried making a new catalog but couldn't find quantity data there either.

3 0 0

Did you find the solution to your case? We are having a similar case where we want to specify increment quantity for each product and use it in the store front end? 

Shopify Partner
4210 974 1184

HI @newbie_01 


This is only available in B2B commerce stores. You can see documentations here

Please don't forget to 



Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Shopify Partner
29 0 6

That's a bummer, but at least we have an answer. Thanks!

Shopify Partner
856 23 161

Is it used for the new cart and checkout validation API? But I can't find any docs mentioning that

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview