{"id":227659,"date":"2020-02-01T15:36:03","date_gmt":"2020-02-01T15:36:03","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=227659"},"modified":"2024-08-07T11:26:38","modified_gmt":"2024-08-07T11:26:38","slug":"magento-2-code-generator","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/","title":{"rendered":"Adobe Commerce (Magento 2) Code Generator"},"content":{"rendered":"\n<p>In this dev doc article, we will talk about Adobe Commerce (Magento 2) Extension Creator. Further, we will also learn how to use  Adobe Commerce (Magento 2) Code Generator which has been developed by Webkul&#8217;s Magento Team.<\/p>\n\n\n\n<p>Firstly, you need to install the module. You can install it with the composer by running following command<\/p>\n\n\n\n<p><code><strong>composer require webkul\/code-generator<\/strong><\/code><\/p>\n\n\n\n<p>You can download it from GitHub <a href=\"https:\/\/github.com\/webkul\/magento2-code-generator\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/webkul\/magento2-code-generator<\/a> also. Then run the <code>php bin\/magento setup:upgrade<\/code> and <code>php bin\/magento setup:di:compile<\/code> to successfully install it.<\/p>\n\n\n\n<figure class=\"wp-block-pullquote has-text-align-left is-style-solid-color has-black-color has-vivid-green-cyan-background-color has-text-color has-background\"><blockquote><p><\/p><cite><strong><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Webkul.automagedev\" target=\"_blank\" rel=\"noreferrer noopener\">AutoMageDev &#8211; Snippets and AutoComplete<\/a><\/strong><br>Advanced Magento 2 AutoSuggestion extension for Visual Studio Code.<\/cite><\/blockquote><\/figure>\n\n\n\n<p>Now let&#8217;s check out how we can use this module to generate codes.<\/p>\n\n\n\n<p><strong>Note<\/strong>: Now this module also works for interactive cli, you need to pass only the type in the command. Ex: <code style=\"background:#e3e9ef;padding:1px 3px\">php bin\/magento generate:code --type=new-module<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"836\" height=\"169\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png\" alt=\"Screenshot-3\" class=\"wp-image-385685\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png 836w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3-300x61.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3-250x51.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3-768x155.png 768w\" sizes=\"(max-width: 836px) 100vw, 836px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Create New Module<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName --type=new-module<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=new-module<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"972\" height=\"329\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-131.png\" alt=\"image-131\" class=\"wp-image-376443\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-131.png 972w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-131-300x102.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-131-250x85.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-131-768x260.png 768w\" sizes=\"(max-width: 972px) 100vw, 972px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>It will create the directory Webkul\/ModuleName under app\/code folder and also create the required files which are registration.php and module.xml.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create Models<\/strong><\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName \n--type=model \n--table=&quot;wk_modulename_testdata&quot; \n--name=TestData<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=model<br>--table=\"table_name\"<br>--name=ModelName<br><\/code><strong><br><\/strong>I have manually created <em>InstallSchema.php<\/em> to create a table named <em>wk_modulename_testdata<\/em>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"259\" height=\"366\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-132.png\" alt=\"image-132\" class=\"wp-image-376445\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-132.png 259w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-132-212x300.png 212w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-132-176x249.png 176w\" sizes=\"(max-width: 259px) 100vw, 259px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>When we run the command it will create the model, resource model, collection classes and api data interface for that table. And if you are using <a href=\"https:\/\/devdocs.magento.com\/guides\/v2.3\/extension-dev-guide\/declarative-schema\/db-schema.html\">db_schema.xml<\/a> file to create the table then it will also generate a getter and setter.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create Repository<\/strong><\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName \n--type=repository \n--name=TestDataRepository \n--model-class=&quot;\\Webkul\\ModuleName\\Model\\TestData&quot; \n--collection-class=&quot;\\Webkul\\ModuleName\\Model\\ResourceModel\\TestData\\Collection&quot;<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=repository<br>--name=RepositoryClassName<br>--model-class=ModelClassFullName<br>--collection-class=CollectionClassFullName<\/code><br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"256\" height=\"335\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-133.png\" alt=\"image-133\" class=\"wp-image-376448\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-133.png 256w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-133-229x300.png 229w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-133-190x249.png 190w\" sizes=\"(max-width: 256px) 100vw, 256px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>It will create the repository class and the interface.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create Controller<\/strong><\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName \n--type=controller \n--name=Index \n--area=frontend \n--path=Test \n--router=test<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=controller<br>--name=ControllerName<br>--area=frontend|adminhtml<br>--path=RelativeToModuleControllerFolder<br>--router=RouteName<\/code><br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"254\" height=\"339\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-134.png\" alt=\"image-134\" class=\"wp-image-376449\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-134.png 254w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-134-225x300.png 225w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-134-187x249.png 187w\" sizes=\"(max-width: 254px) 100vw, 254px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>It will create the controller class and also create the <em>routes.xml<\/em> if it is not available. If you want to create a controller for the admin end then you must adminhtml in the area parameter. In that case, the <em>path<\/em> parameter will be relative to Controller\/Adminhtml folder as shown below,<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName \n--type=controller \n--name=Index \n--area=adminhtml \n--path=Test \n--router=test<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"256\" height=\"400\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-135.png\" alt=\"image-135\" class=\"wp-image-376453\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-135.png 256w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-135-192x300.png 192w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-135-159x249.png 159w\" sizes=\"(max-width: 256px) 100vw, 256px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<h4 class=\"wp-block-heading\">Create Helper<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName --type=helper --name=Data<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=helper<br>--name=HelperName<\/code><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"253\" height=\"291\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-136.png\" alt=\"image-136\" class=\"wp-image-376454\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-136.png 253w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-136-216x249.png 216w\" sizes=\"(max-width: 253px) 100vw, 253px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>This command creates the Helper class in the Helper folder.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Plugin<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName\n--type=plugin\n--name=ProductAttributesUpdater\n--plugin=&quot;\\Magento\\Catalog\\Model\\Product&quot;<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=plugin<br>--name=PluginName<br>--plugin=FullClassName<br>--area=frontend|adminhtml<\/code> <strong>(<em>Optional, default area is all<\/em>)<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"257\" height=\"399\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-137.png\" alt=\"image-137\" class=\"wp-image-376455\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-137.png 257w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-137-193x300.png 193w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-137-160x249.png 160w\" sizes=\"(max-width: 257px) 100vw, 257px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>This will create the Plugin class in the Plugin folder and add the plugin entry in the <em>di.xml<\/em> file. If di.xml is not already available then it will create a new di.xml file. <\/p>\n\n\n\n<p>The <em>area<\/em> parameter is optional, if it is not provided then it will create di.xml directly under the etc folder and if provided then it will create the di.xml under the given area folder which will be under the etc folder.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Observer<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName \n--type=observer \n--name=SalesOrderPlaceAfterObserver \n--event=checkout_submit_all_after<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=observer<br>--name=ObserverName<br>--event=event_name<br>--area=frontend|adminhtml<\/code> <strong>(<em>Optional, default area is all<\/em>)<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"258\" height=\"379\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-145.png\" alt=\"image-145\" class=\"wp-image-376467\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-145.png 258w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-145-204x300.png 204w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-145-170x249.png 170w\" sizes=\"(max-width: 258px) 100vw, 258px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>The observer command will create the Observer class in the Observer folder and create events.xml if events.xml is not already created. Otherwise it will add the entry in the existing events.xml file. <\/p>\n\n\n\n<p>The area parameter is optional, if it is not provided then it will create events.xml directly under the etc folder and if provided then it will create the events.xml under the given area folder which will be under the etc folder.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Cron<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName\n--type=cron\n--name=SendStatement\n--schedule=&quot;0 1 * * *&quot;<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=cron<br>--name=CronName<br>--schedule=\"0 1 * * *\"<\/code> <strong><em>(Optional, default schedule is &#8220;0 1 * * *&#8221;)<\/em><\/strong><br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"199\" height=\"422\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-146.png\" alt=\"image-146\" class=\"wp-image-376468\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-146.png 199w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-146-141x300.png 141w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-146-117x249.png 117w\" sizes=\"(max-width: 199px) 100vw, 199px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>It will create the Cron class in the Cron folder and will create the <em>crontab.xml<\/em> file if does not exist else it will just add the entry.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Custom Logger<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName \n--type=logger \n--name=&quot;customlogfile&quot;<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=logger<br>--name=loggerfilename<\/code><strong><em> (Optional, default name is vendorname_modulename.log)<\/em><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"205\" height=\"463\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-144.png\" alt=\"image-144\" class=\"wp-image-376466\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-144.png 205w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-144-133x300.png 133w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-144-110x249.png 110w\" sizes=\"(max-width: 205px) 100vw, 205px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>When we run the command it will create the required files for a <a href=\"https:\/\/webkul.com\/blog\/create-a-custom-log-file-in-magento-2-using-monolog-and-logging-data-into-it\/\">custom logger<\/a>. Then you can use the logger class which is<em> \\Webkul\\ModuleName\\Logger\\Logger<\/em> in our case to log data in your custom logger file. <strong><em>Note-<\/em><\/strong> No need to add .log extension in the<em> &#8211;name<\/em> param.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Command<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName \n--type=command \n--name=PrintHello \n--command=&#039;test:hello&#039;<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=command<br>--name=CommandClass <br>--command='test:hello'<\/code><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"196\" height=\"464\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-143.png\" alt=\"image-143\" class=\"wp-image-376465\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-143.png 196w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-143-127x300.png 127w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-143-105x249.png 105w\" sizes=\"(max-width: 196px) 100vw, 196px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>It will create the command class in <em>Console\/Command<\/em> folder. So when we run<em> php bin\/magento test:hello<\/em> (in our case) it will run the execute method of the command class.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Override of classes like Block, Model, Controller, etc<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName \n--type=rewrite \n--name=ProductView \n--rewrite=&quot;Magento\\Catalog\\Controller\\Product\\View&quot; \n--path=&quot;Rewrite\/Controller&quot;<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=rewrite<br>--name=ClassName <br>--rewrite='OverriddenClass' <br>--path=RelativeToModuleFolder<\/code> <strong><em>(Optional, if not provided it will create the class in Rewrite folder)<\/em><\/strong><br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"209\" height=\"360\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-142.png\" alt=\"image-142\" class=\"wp-image-376464\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-142.png 209w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-142-174x300.png 174w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-142-145x249.png 145w\" sizes=\"(max-width: 209px) 100vw, 209px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>It will create a class with the name as in <em>&#8211;name<\/em> param and it will be created in a folder that has been provided in <em>&#8211;path<\/em> param. <\/p>\n\n\n\n<p>If no <em>&#8211;path<\/em> param is provided then it will be created in the Rewrite folder by default. The class which has to be overridden must be provided in <em>&#8211;rewrite<\/em> param. The preference entry will be added in the di.xml file.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create View<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName\n--type=create-view\n--name=test_test_index\n--area=frontend\n--block-class=MainData\n--template=test.phtml\n--layout-type=2columns-left\n\n&lt;strong&gt;Available Params:&lt;\/strong&gt;\n&lt;code&gt;--type=create-view\n--name=route_controller_action\n--area=frontend|adminhtml\n--block-class=Main&lt;\/code&gt; &lt;strong&gt;&lt;em&gt;(Optional, default value is Main)&lt;\/em&gt;&lt;\/strong&gt;&lt;code&gt;\n--template=content.phtml&lt;\/code&gt;&lt;strong&gt;&lt;em&gt;(Optional, default value is content.phtml)&lt;\/em&gt;&lt;\/strong&gt;&lt;code&gt;\n--layout-type=empty|1column|2columns-left|2columns-right|3columns|admin-empty|admin-1column|admin-2columns-left&lt;\/code&gt; &lt;strong&gt;&lt;em&gt;(Optional) &lt;\/em&gt;&lt;\/strong&gt;<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"206\" height=\"382\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-141.png\" alt=\"image-141\" class=\"wp-image-376461\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-141.png 206w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-141-162x300.png 162w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-141-134x249.png 134w\" sizes=\"(max-width: 206px) 100vw, 206px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>This command will create the block class, layout file and the template file under respective directories. You can generate view for both frontend and backend with this command.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Email Template<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_ModuleName\n--type=email\n--name=&quot;Email Label&quot;\n--id=&quot;modulename_email_test&quot;\n--template=&quot;test&quot;<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=email <br>--name=\"Label\"<br>--id=\"modulename_email_label\"<\/code> <strong><em>(Optional, default value is modulename_email_label)<\/em><\/strong><code><br>--template=\"label\"<\/code> <strong><em>(Optional, default value is label.phtml)<\/em><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"190\" height=\"356\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-140.png\" alt=\"image-140\" class=\"wp-image-376460\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-140.png 190w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-140-160x300.png 160w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-140-133x249.png 133w\" sizes=\"(max-width: 190px) 100vw, 190px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>This will create the template file in <em>view\/frontend\/email<\/em> folder and add the entry for the email in email_templates.xml file which will be created automatically if not exist. You can check more about emails on <a href=\"https:\/\/webkul.com\/blog\/magento2-create-custom-email-templates\/\">blog<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Payment Method<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_CustomPay\n--type=payment\n--payment-code=CustomPayPOD\n--name=&quot;Custom Pay POD&quot;<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br><code>--type=payment<br>--payment-code=PaymentCode<\/code><br><code>--name=\"Payment Name\"<\/code><strong><em> (Optional, default value is &#8220;Custom Payment&#8221;)<\/em><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"266\" height=\"461\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-139.png\" alt=\"image-139\" class=\"wp-image-376459\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-139.png 266w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-139-173x300.png 173w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-139-144x249.png 144w\" sizes=\"(max-width: 266px) 100vw, 266px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>The payment creates command will create the necessary files for creating a payment method. It will add an entry in <em>system.xml<\/em> to show it in the Payment Methods section.<\/p>\n\n\n\n<p>Also, the files required to show and modify the payment method on the checkout page will be created. You just need to edit the model class.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Shipping Method<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_CustomShip\n--type=shipping\n--shipping-code=custom_shipping\n--name=&quot;Custom Shipping&quot;<\/pre>\n\n\n\n<p><strong>Available Params:<br><\/strong><code>--type=shipping<br>--shipping-code=shipping_code<\/code><br><code>--name=\"Custom Shipping\"<\/code> <strong><em>(Optional, default value is &#8220;Custom Shipping&#8221;)<\/em><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"261\" height=\"259\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-138.png\" alt=\"image-138\" class=\"wp-image-376458\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-138.png 261w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-138-250x249.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/image-138-120x120.png 120w\" sizes=\"(max-width: 261px) 100vw, 261px\" loading=\"lazy\" \/><\/figure>\n<\/div>\n\n\n<p>It will add an entry in <em>system.xml <\/em>to show it in the Shipping Methods section. Also, the Carrier Class will be created where you can modify the <em>collectRates<\/em> method.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Unit Test<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Module_Name --type=unit-test<\/pre>\n\n\n\n<p><strong>Available Params:<\/strong><br>&#8211;type=unit-test<br><br>This will generate the Unit Test Classes under the <em>Test\/Unit<\/em> folder. To check out more about the Unit Test please follow our blog <a href=\"https:\/\/webkul.com\/blog\/php-unit-test-in-magento-open-source\/\" target=\"_blank\" rel=\"noreferrer noopener\">Unit Test Implementation in Magento 2 custom module<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Ui Component Listing<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Webkul_TestModule\n--type=ui_component_listing\n--name=test_test\n--columns_name=test_column\n--model_class_name=TestData\n--table=test_table<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Available Params:<\/strong><\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">--type=ui_component_listing\n--name=Ui Grid Listing File Name\n--columns_name=Listing Columns Name\n--model_class_name=Model Class Name for getCollection\n--table=Table Name for Get Column<\/pre>\n\n\n\n<p>It will add an entry in the <em>di.xml <\/em> file and create the listing file in the <em>view\/adminhtml\/ui_component<\/em> folder.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Create Ui Component Form<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/magento generate:code Module_Name\n--type=ui_component_form \n-name=&quot;test_test_form&quot;\n--provider_name=&quot;Data Provider Name&quot;\n--model_class_name=&quot;Model Class Name&quot;\n--fieldset_name=&quot;Field Set Name&quot;\n--fieldset_label=&quot;Field Set Label&quot;\n--submit_url=&quot;Form Submit Url&quot;\n--form_field=&quot;Form Fields in Json Format&quot;<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Available Params:<\/strong><\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\">--type=ui_component_form\n--name=Ui Form File Name\n--provider_name=Data Provider Class Name\n--model_class_name=Model Class Name for getCollection\n--fieldset_name=Field Set Name for Field\n--fieldset_label=Field Set Label\n--submit_url=Form submit url (test\/test\/save)\n--form_field=&#091;{&quot;field_name&quot;: &quot;test_input_field&quot;, &quot;field_type&quot;: &quot;input&quot;, &quot;field_label&quot;: &quot;Test Input Field&quot;, &quot;is_required&quot;: &quot;true&quot;}]<\/pre>\n\n\n\n<p><strong>Note<\/strong>: The form will accept the (<strong>input, select, multiselect, imageUploader<\/strong>) field types.<\/p>\n\n\n\n<p>It will create the save and back button for the form and also add a DataProvider for the form data in <em>Ui\/DataProvider<\/em> folder after that it will create a UI component form in the<em> view\/adminhtml\/ui_component<\/em> folder<\/p>\n\n\n\n<p>For technical assistance, please contact us via email at <a href=\"mailto:support@webkul.com\">support@webkul.com.<\/a> Additionally, explore a variety of solutions to improve your online store by visiting the <a href=\"https:\/\/store.webkul.com\/Magento-2.html\">Adobe Commerce extensions<\/a> page.<\/p>\n\n\n\n<p>For professional advice or to develop customized features, consider hiring <a href=\"https:\/\/webkul.com\/hire-magento-developers\/\">Adobe Commerce Developers<\/a> for your project.<\/p>\n\n\n\n<p>Thanks for reading the blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this dev doc article, we will talk about Adobe Commerce (Magento 2) Extension Creator. Further, we will also learn how to use Adobe Commerce (Magento 2) Code Generator which has been developed by Webkul&#8217;s Magento Team. Firstly, you need to install the module. You can install it with the composer by running following command <a href=\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9121],"tags":[12967,2460,2070],"class_list":["post-227659","post","type-post","status-publish","format-standard","hentry","category-magento-2","tag-adobe-commerce","tag-magento-2","tag-magento2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento 2 Code Generator | Magento 2 Extension Creator<\/title>\n<meta name=\"description\" content=\"we will talk about Adobe Commerce (Magento 2) Extension Creator. Further, we will also learn how to use Adobe Commerce (Magento 2)\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento 2 Code Generator | Magento 2 Extension Creator\" \/>\n<meta property=\"og:description\" content=\"we will talk about Adobe Commerce (Magento 2) Extension Creator. Further, we will also learn how to use Adobe Commerce (Magento 2)\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-01T15:36:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-07T11:26:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png\" \/>\n<meta name=\"author\" content=\"Abhishek Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/\"},\"author\":{\"name\":\"Abhishek Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0\"},\"headline\":\"Adobe Commerce (Magento 2) Code Generator\",\"datePublished\":\"2020-02-01T15:36:03+00:00\",\"dateModified\":\"2024-08-07T11:26:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/\"},\"wordCount\":1068,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png\",\"keywords\":[\"Adobe Commerce\",\"Magento 2\",\"Magento2\"],\"articleSection\":[\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/\",\"url\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/\",\"name\":\"Magento 2 Code Generator | Magento 2 Extension Creator\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png\",\"datePublished\":\"2020-02-01T15:36:03+00:00\",\"dateModified\":\"2024-08-07T11:26:38+00:00\",\"description\":\"we will talk about Adobe Commerce (Magento 2) Extension Creator. Further, we will also learn how to use Adobe Commerce (Magento 2)\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png\",\"width\":836,\"height\":169,\"caption\":\"Screenshot-3\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Adobe Commerce (Magento 2) Code Generator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0\",\"name\":\"Abhishek Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Abhishek Singh\"},\"description\":\"Adobe Commerce certified Magento developer with over 12 years of experience at Webkul. Passionate about scalable Magento 2-based webshops, AI, and multi-channel integrations, Abhishek consistently delivers innovative and efficient e-commerce solutions that propel businesses forward.\",\"sameAs\":[\"http:\/\/webkul.com\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/abhishek\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Magento 2 Code Generator | Magento 2 Extension Creator","description":"we will talk about Adobe Commerce (Magento 2) Extension Creator. Further, we will also learn how to use Adobe Commerce (Magento 2)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/","og_locale":"en_US","og_type":"article","og_title":"Magento 2 Code Generator | Magento 2 Extension Creator","og_description":"we will talk about Adobe Commerce (Magento 2) Extension Creator. Further, we will also learn how to use Adobe Commerce (Magento 2)","og_url":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2020-02-01T15:36:03+00:00","article_modified_time":"2024-08-07T11:26:38+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png","type":"","width":"","height":""}],"author":"Abhishek Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Abhishek Singh","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/"},"author":{"name":"Abhishek Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0"},"headline":"Adobe Commerce (Magento 2) Code Generator","datePublished":"2020-02-01T15:36:03+00:00","dateModified":"2024-08-07T11:26:38+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/"},"wordCount":1068,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png","keywords":["Adobe Commerce","Magento 2","Magento2"],"articleSection":["Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/magento-2-code-generator\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/","url":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/","name":"Magento 2 Code Generator | Magento 2 Extension Creator","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png","datePublished":"2020-02-01T15:36:03+00:00","dateModified":"2024-08-07T11:26:38+00:00","description":"we will talk about Adobe Commerce (Magento 2) Extension Creator. Further, we will also learn how to use Adobe Commerce (Magento 2)","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/magento-2-code-generator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-3.png","width":836,"height":169,"caption":"Screenshot-3"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/magento-2-code-generator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Adobe Commerce (Magento 2) Code Generator"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0","name":"Abhishek Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Abhishek Singh"},"description":"Adobe Commerce certified Magento developer with over 12 years of experience at Webkul. Passionate about scalable Magento 2-based webshops, AI, and multi-channel integrations, Abhishek consistently delivers innovative and efficient e-commerce solutions that propel businesses forward.","sameAs":["http:\/\/webkul.com"],"url":"https:\/\/webkul.com\/blog\/author\/abhishek\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/227659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=227659"}],"version-history":[{"count":89,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/227659\/revisions"}],"predecessor-version":[{"id":456731,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/227659\/revisions\/456731"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=227659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=227659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=227659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}