Magento2 extension to prevent add to cart action if customer is not logged in.
- To prevent add to cart if customer is not logged in, it will redierct customer to the login page.
- Looks like core functionality of Magento (at backend as well as frontend)
- Unencrypted code for easy customization
- Copy the content of the repo to the app/code/Nadeem/PreventAddToCart/ folder
- Run command: php bin/magento setup:upgrade
- Run Command: php bin/magento setup:static-content:deploy
- Now Flush Cache: php bin/magento cache:flush
Want to contribute to this extension? The quickest way is to open a pull request on GitHub.
If you encounter any problems or bugs, please open an issue on GitHub.
Prerequisite | How to check | For more information |
---|---|---|
Apache 2.2 or 2.4 | Ubuntu: apache2 -v CentOS: httpd -v |
Apache |
PHP 7.*.* | php -v |
PHP Ubuntu PHP CentOS |
MySQL 5.6.x | mysql -u [root user name] -p |
MySQL |