Magento 2 : Max Qty Allowed on Items Customization while update cart page

Here We will learn about Max Qty Allowed on Items Customization while update cart page.

We have to create a new module if you already not created, after that follow the steps that describe in the post.

#1 : We need to register the Plugin in magento 2.

add the following code in “etc/frontend/di.xml” of your module

#2 : Add the following code in your plugin file.

Namespace\Modulename\Plugin\Qtycheck.php

#3 : Now you need to run the dependancy Setup in your console or terminal command.

php bin/magento setup:di:compile

#4: Flush the cache in your console or terminal command

php bin/magento cache:clean && bin/magento cache:flush