Category Archives: Magento2 Tutorial

These tutorial series helps you to understand the admin section of Magento 2

How to add new console command in Magento 2

How To Add New Console Command In Magento 2

Create a new module with CustomCommandLine_ConsoleCommand. Step 1: Create registration.php file. app/code/CustomCommandLine/ConsoleCommand/registration.php Step 2: Create module.xml file. app/code/CustomCommandLine/ConsoleCommand/etc/module.xml Step 3: Create di.xml file. app/code/CustomCommandLine/ConsoleCommand/etc/di.xml Step 4: Create Generation.php file. app/code/CustomCommandLine/ConsoleCommand/Model/Generation.php Step 5: Next, we need to check if your new command is shown in the command list or not for that you need to run […]

Setup scripts in Magento 2

Setup Scripts In Magento 2

Create a new module with CustomScripts_SetupScripts Step 1: Create module.xml file. app/code/CustomScripts/SetupScripts/etc/module.xml Step 2: Create registration.php file. app/code/CustomScripts/SetupScripts/registration.php Step 3: Create InstallSchema.php file. app/code/CustomScripts/SetupScripts/Setup/InstallSchema.php Step 4: Create InstallData.php file. app/code/CustomScripts/SetupScripts/InstallData.php Step 5: Create UpgradeSchema.php file. app/code/CustomScripts/SetupScripts/Setup/UpgradeSchema.php Step 6: Create UpgradeData.php file. app/code/CustomScripts/SetupScripts/Setup/UpgradeData.php Step 7: Create Recurring.php file. app/code/CustomScripts/SetupScripts/Setup/Recurring.php Step 8: Create Uninstall.php file. app/code/CustomScripts/SetupScripts/Setup/Uninstall.php Please […]