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?
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.
You can use below extension for this. It's meet your requirements.