How can I limit the maximum number of items allowed for the ENTIRE CART regardless if the items were from the same product or from different products?
3 Answers
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”.
we use it for per product cart limit.
For Cart Total Product Limit , We Use BSS Free Extension
we follow these steps to limit per product quantity and cart total product limit.
I think this is useful for you.
Admin -> store-> Configuration -> catalog -> Inventory -> Product Stock Option
Change your "Maximum Qty Allowed in Shopping Cart" then, save and remove var/* then check it.
-
1Raj! this will limit the total number of items from one product in the cart. so if I set that to 5 and I tried to add more than 5 items from Product A I will not be able. However if I added 10 items each from different product that will be allowable– WhaaaaatSep 3, 2016 at 10:35
You can use below extension for this. It's meet your requirements.
https://bsscommerce.com/magento-2-extensions/limit-cart-quantity-for-magento-2.html