November Happy Hour will be moved to Thursday December 5th.

Inventory- Get Maximum Quantity set on the inventory tab

Vote:
 

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. 

Scenario:

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.

#278416
Edited, Apr 13, 2022 1:08
Vote:
 

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

variantContent.MaxQuantity = 10m;

#278421
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.