Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fsspencer/magento2-disableaddtocart
Magento 2 extension sample to disable the Add to Cart functionality
https://github.com/fsspencer/magento2-disableaddtocart
magento magento-extension magento2 magento2-extension magento2-module
Last synced: 20 days ago
JSON representation
Magento 2 extension sample to disable the Add to Cart functionality
- Host: GitHub
- URL: https://github.com/fsspencer/magento2-disableaddtocart
- Owner: fsspencer
- Created: 2017-11-05T17:45:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-05T17:48:52.000Z (about 7 years ago)
- Last Synced: 2024-11-05T10:13:48.064Z (2 months ago)
- Topics: magento, magento-extension, magento2, magento2-extension, magento2-module
- Language: PHP
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Magento 2 Disable Add To Cart
This is a sample extension to show you how to prevent a customer to Add a product to the cart.
You can add your custom logic before performing this restriction.## Installation
NOTE: This extension uses a plugin (iterator) on the "addProduct()" method to prevent a product to be added to the cart.
1. Clone this repository
2. Copy the Codealist directory into your app/code directory
3. Execute: php bin/magento setup:upgradeNow when you try to add a product to your cart, you'll receive an error message telling you that the operation cannot be performed.
## Compatibility
- Magento 2.0
- Magento 2.1
- Magento 2.2