You can add a new category attribute with the help of InstallData.php.
Create InstallData.php
File : app/code/PHPCodez/First/Setup/InstallData.php Continue reading Magento 2 Add Category Attribute
You can add a new category attribute with the help of InstallData.php.
Create InstallData.php
File : app/code/PHPCodez/First/Setup/InstallData.php Continue reading Magento 2 Add Category Attribute
Here I am creating a module PHPCodez_Customers that will help us to create customers from commandline.
Create folders for the modul app/code/PHPCodez/Customers Continue reading Magento 2 Create Customers Using CLI
Follow the below steps to create CMS page programmatically.
Create UpgradeData.php and define upgrade()
File : app/code/PHPCodez/First/Setup/UpgradeData.php Continue reading Magento 2 create CMS page programmatically
To remove customer attribute programatically, create InstallData.php and and define the method intsall() as follows
File : app/code/PHPCodez/First/Setup/InstallData.php Continue reading Magento 2 Remove Customer Attribute Programmatically
To remove product attribute programatically, create InstallData.php and and define the method intsall() as follows
File : app/code/PHPCodez/First/Setup/InstallData.php Continue reading Magento 2 Remove Product Attribute Programmatically
To add product attribute programatically, create InstallData.php and and define the method intsall() as follows
File : app/code/PHPCodez/First/Setup/InstallData.php Continue reading Magento 2 Add Product Attribute Programmatically
To add customer attribute programatically, create InstallData.php and and define the method install() as follows
File : app/code/PHPCodez/First/Setup/InstallData.php Continue reading Magento 2 Add Customer Attribute Programmatically
Follow the below steps to create new command line in to Console CLI in Magento 2.
Define command in di.xml
In di.xml file, you can use a type with name Magento\Framework\Console\CommandList to define the command option. Continue reading Add New Command Magento 2
We can rewrite controller with the help of router. Magento provides the attribute before/after to config the module sort order which define what module controller will be find first.
For example, if we want to rewrite the controller customer/account/login, we will define more route in the route.xml like this: Continue reading Magento 2 Routing Rewrite Controller
The Route will define name for a module which we can use in the url to find the module and execute the controller action.
In Magento 2, the request url will be http://phpcodez.com/index.php/front_name/controller/action Continue reading Magento 2 Routing