This module enable possibility to disable Add to cart button from product and category page for not logged in customers. It can be useful for B2B customers, if we don't want to allow guest to add product to cart.
- Magento 2.1, 2.2, 2.3
- Run
composer require sbodak/magento2-b2b-disable-add-to-cart-button-for-guest
- Run
php bin/magento module:enable Bodak_DisableAddToCart
- Run
php bin/magento setup:upgrade
- Run
php bin/magento cache:clean
- Go to Magento admin interface
- Find option in
Stores > Configuration > Catalog > Catalog
- Under the
Storfront
tab you will find theDisable Add to cart button for Guests
option Enable
this option to activate the plugin
- Run
composer remove sbodak/magento2-b2b-disable-add-to-cart-button-for-guest