Inventory management is undoubtedly one of the most important factors where merchants pay their attention.
A merchant has to manage inventory properly to satisfy their customers. If a customer purchases the same product on a large quantity, the product may be sold out and no other customers will be able to purchase that product.
If other customers are not able to buy a product even in a single quantity or in a small quantity, it drastically reduces the shopping experience to customers.
The configuration of maximum and minimum quantity based on customer groups can be done with Meetanshi’s Magento 2 Limit Cart Quantity extension.
By setting up the maximum quantity allowed to be sold by a single customer, the Magento 2 store owners can restrict customers from buying a product on a large quantity.
The default Magento 2 has the facility to do so. Improve the sales management using the steps given below in your Magento 2 store:
Steps to Set Maximum Qty Allowed in Shopping Cart in Magento 2

- Login to Magento 2 admin panel
- Navigate to Stores > Settings > Configuration
- Select Inventory under Catalog section
- Expand Product Stock Options section
- Set the maximum quantity as per your business requirement in Maximum Qty Allowed in Shopping Cart
- Click Save Config
Here, I have set 15 as a maximum quantity allowed in the shopping cart. Therefore, when customers will add more quantity than 15, the error message will be shown saying that “The maximum you may purchase is 15”.
The below figure shows the error message to restrict the customer to add the products to the cart.

That’s it.
You can also refer to the video tutorial to Set Maximum Qty Allowed in Shopping Cart in Magento 2 from our Magento 2 video tutorial series:
Do consider sharing this post with Magento 2 community via social media.
Thank you.