Custom Coupons M2 - Installation
In order to install any extension for Magento 2, the first thing to do is to create the folder ‘ code’ under ‘app’ in Magento 2 root category, as shown in the screenshot below.
In Magento 2, extension files are placed in one module folder so there is no need to copy files to different directories like it used to be in Magento 1.
These are the steps is to install the extension:
- Open the console, please type: "php bin/magento module:enable Cminds_Coupon" and hit Enter.
- Follow with command “php bin/magento setup:upgrade”.
- Then do the same with the command 'php bin/magento setup:static-content:deploy'.
php bin/magento module:enable Cminds_Coupon
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
After those steps, you should see that our module is enabled.
To check the list of enabled modules, you can:
- Run the command 'app/etc/config.php' in the console command; or,
- Go to Stores → Configuration → Advanced → Advanced in the Admin Panel
The last thing that you need to do is to flush Magento cache. You can do this in two ways:
- Running in console command the command 'php bin/magento cache:clean':
php bin/magento cache:clean