Magento2: How to stop a product from getting added to cart programmatically?
If youn want to stop a product from getting addded to cart programmatically, add below files to your module:
Vendor_Module\etc\di.xml
Vendor_Module\Model\Checkout\Cart\AddProduct.php
Vendor_Module\etc\di.xml
Vendor_Module\Model\Checkout\Cart\AddProduct.php
Comments
Post a Comment