Category Archives: Magento2

How to add Custom CMS page layout in Magento 2?

How To Add Custom CMS Page Layout In Magento 2

We will create custom layout with named Knowband Layout. Create a new module with CustomLayout_CustomCMS. Step 1: Create registration.php file. app/design/frontend/CustomLayout/CustomCMS/registration.php Step 2: Create module.xml file. app/design/frontend/CustomLayout/CustomCMS/etc/module.xml Step 3: Create kb_layout.xml file. app/design/frontend/CustomLayout/CustomCMS/view/frontend/page_layout/kb_layout.xml Step 4: Create layouts.xml file. app/design/frontend/CustomLayout/CustomCMS/view/frontend/layouts.xml Step 5: Run the below command. After creating these files, your custom layout will be added […]

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 […]