Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Inventory- Get Maximum Quantity set on the inventory tab


Is there a way to get Maximum Quantity set for a variant other than via OrderGroup extensions like UpdateInventoryOrRemoveLineItems. 

The reason for it is, I am trying to display a message to user in the product page is that they can only order the max quantity set for the variant eventhough the stock quantity is high. 


Product x

Stock Quantity: 250

Maximum Quantity: 10 

Product Page:

Available Quantity: 250

*Maximum quantities can be ordered per order is 10

I couldnt find a method to get Maximum Quantity or as part of InventoryRecord. Iwould like to know if there is a way to get it. 

Thanks in advance.

Edited, Apr 13, 2022 1:08

The Max quantity is not per inventory record, but per SKU, you would need to set it like this

variantContent.MaxQuantity = 10m;

Apr 13, 2022 8:04
Arun - Apr 13, 2022 8:22
Thanks for the answer Quan.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.