{"id":397574,"date":"2023-09-07T07:06:58","date_gmt":"2023-09-07T07:06:58","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=397574"},"modified":"2023-09-08T11:37:23","modified_gmt":"2023-09-08T11:37:23","slug":"how-to-create-a-plugin-in-shopware","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/","title":{"rendered":"How to create a Plugin in Shopware"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Hello, tech geeks today we will see how to create a plugin in Shopware. Anyone can create a plugin in Shopware in less than 30 minutes. We will create a plugin in Shopware for adding blog functionality to our storefront. Let&#8217;s get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Before start creating your plugin it is good to have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Basic understanding of tech stack used in Shopware (Twig, Symfony, VueJs, etc.)<\/li>\n\n\n\n<li><strong>PHP OOPs<\/strong> and other concepts such as Symfony&#8217;s <strong>dependency injection<\/strong>, <strong>annotations<\/strong>, etc., are essential.<\/li>\n<\/ul>\n\n\n\n<p>The steps for creating a plugin are as follows:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Directory structure<\/h2>\n\n\n\n<p>The overall general directory structure of a plugin looks like this,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"893\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/hirearchy_up-1200x893.png\" alt=\"hirearchy_up\" class=\"wp-image-398402\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/hirearchy_up-1200x893.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/hirearchy_up-300x223.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/hirearchy_up-250x186.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/hirearchy_up-768x572.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/hirearchy_up.png 1263w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Plugin directory structure<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create a base setup for the plugin in shopware<\/h2>\n\n\n\n<p>Run the following command, it will generate a base for your plugin.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">.\/bin\/console plugin:create WkBlogPlugin<\/pre>\n\n\n\n<p>After this command, you will see the following files:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>composer.json<\/strong> file includes your plugin&#8217;s general information, i.e. name, description, version, label, theme, etc.<\/li>\n\n\n\n<li><strong>WkBlogPlugin.php<\/strong> class under the src directory. When the plugin gets installed and uninstalled, it will execute this class. You can control things like deleting a table when the plugin gets uninstalled here.<\/li>\n\n\n\n<li><strong>services.xml<\/strong> file under<em> src\/Resources\/config <\/em>directory. This file registers your controllers, services, subscribers, schedules tasks, etc., for your plugin.<\/li>\n<\/ul>\n\n\n\n<p>You can see the created plugin under<em> the Extension\/My Extensions<\/em> menu in administration. To change the name from the Skeleton plugin to your desired name make changes in the <strong>composer.json<\/strong> file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"608\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/screenshot_1694147092486-1200x608.png\" alt=\"create plugin for shopware\" class=\"wp-image-399031\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/screenshot_1694147092486-1200x608.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/screenshot_1694147092486-300x152.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/screenshot_1694147092486-250x127.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/screenshot_1694147092486-768x389.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/screenshot_1694147092486.png 1262w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Plugin in Extensions\/My Extension<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Create migration and entities for the plugin in shopware<\/h2>\n\n\n\n<p>To create migrations for generating tables use the following command,<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">.\/bin\/console database:create-migration -p WkBlogPlugin<\/pre>\n\n\n\n<p>Update the update method on the created class with the following code,<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">#src\/Migration\/Migration*.php\n\npublic function update(Connection $connection): void\n{\n   $connection-&gt;executeUpdate(&#039;\n        CREATE TABLE IF NOT EXISTS `Wk_blog` (\n            `id` BINARY(16) NOT NULL,\n            `media_id` BINARY(16) NOT NULL,\n            `title` VARCHAR(50),\n            `created_at` DATETIME(3) NOT NULL,\n            `updated_at` DATETIME(3) NULL,\n            PRIMARY KEY (id),\n            CONSTRAINT `fk.media.id` FOREIGN KEY (`media_id`)\n                REFERENCES `media` (`id`)\n        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n        &#039;);\n}<\/pre>\n\n\n\n<p>The plugin automatically executes the migrations when installed, and to start using your table in the plugin, you need to create the entity definitions for the table. To see how to do that refer to How to <a href=\"https:\/\/developer.shopware.com\/docs\/guides\/plugins\/plugins\/framework\/data-handling\/add-custom-complex-data\">Add Entities in Shopware<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Create configurations for the plugin in shopware<\/h2>\n\n\n\n<p>Create a file named <strong>config.xml<\/strong> under <em>src\/Resources\/config\/<\/em> directory and add the following code,<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">#src\/Resources\/config\/config.xml\n\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;\n        xsi:noNamespaceSchemaLocation=&quot;https:\/\/raw.githubusercontent.com\/shopware\/platform\/trunk\/src\/Core\/System\/SystemConfig\/Schema\/config.xsd&quot;&gt;\n    &lt;card&gt;\n        &lt;title&gt;Blog Plugin Settings&lt;\/title&gt;\n        &lt;title lang=&quot;de-DE&quot;&gt;Blog-Plugin-Einstellungen&lt;\/title&gt;\n\n        &lt;input-field type=&quot;bool&quot;&gt;\n            &lt;name&gt;isShare&lt;\/name&gt;\n            &lt;label&gt;Add Share Button on Blogs?&lt;\/label&gt;\n            &lt;label lang=&quot;de-DE&quot;&gt;Schaltfl\u00e4che \u201eTeilen\u201c in Blogs hinzuf\u00fcgen?&lt;\/label&gt;\n            &lt;defaultValue&gt;false&lt;\/defaultValue&gt;\n        &lt;\/input-field&gt;\n    &lt;\/card&gt;\n&lt;\/config&gt;<\/pre>\n\n\n\n<p>This will render our configuration settings in administration like this,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"623\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Screenshot-from-2023-09-05-16-28-40-1200x623.png\" alt=\"create a plugin\" class=\"wp-image-398404\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Screenshot-from-2023-09-05-16-28-40-1200x623.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Screenshot-from-2023-09-05-16-28-40-300x156.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Screenshot-from-2023-09-05-16-28-40-250x130.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Screenshot-from-2023-09-05-16-28-40-768x398.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Screenshot-from-2023-09-05-16-28-40.png 1278w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Plugin configurations<\/figcaption><\/figure>\n\n\n\n<p>To see all available input fields and how to use them refer to <a href=\"https:\/\/developer.shopware.com\/docs\/guides\/plugins\/plugins\/plugin-fundamentals\/add-plugin-configuration\">How to add configurations to plugin<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Create a module in the administration<\/h2>\n\n\n\n<p>Make a file <strong>main.js<\/strong> under the <em>src\/Resources\/app\/administration\/src<\/em> directory. This is the root file for all your modules and services. You will include every module or service you create here as shown below<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">#src\/Resources\/app\/administration\/src\/main.js\n\nimport &#039;.\/module\/wk-blog&#039;;<\/pre>\n\n\n\n<p>Now, create an <strong>index.js<\/strong> file for your module under <em>src\/Resources\/app\/administration\/src\/module\/Wk-blog<\/em> directory as shown and add the following code.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">src\/Resources\/app\/administration\/src\/module\/Wk-blog\/index.js\n\nimport &#039;.\/page\/Wk-blog-list&#039;;\n\nimport enGB from &#039;.\/snippet\/en-GB&#039;;\nimport deDE from &#039;.\/snippet\/de-DE&#039;;\n\nShopware.Module.register(&#039;Wk-blogs&#039;, {\n    type: &#039;plugin&#039;,\n    name: &#039;blogs&#039;,\n    title: &#039;Wk-blog.settings.title&#039;,\n    description: &#039;Manage Blogs&#039;,\n    color: &#039;#ff3d58&#039;,\n    icon: &#039;default-shopping-paper-bag-product&#039;,\n    \n    snippets:{\n        &#039;de-DE&#039;: deDE,\n        &#039;en-GB&#039;: enGB\n    },\n\n    routes:{\n        list:{\n            component: &#039;blog-list&#039;,\n            path: &#039;list&#039;,\n            meta: {\n                parentPath: &#039;sw.settings.index.plugins&#039;\n            }\n        }\n    },\n\n    settingsItem: &#091;{\n        group: &#039;plugins&#039;,\n        to: &#039;Wk.blogs.list&#039;,\n        icon: &#039;default-object-rocket&#039;,\n        name: &#039;exampleBlogs&#039;\n    }]\n    \n});<\/pre>\n\n\n\n<p>The settingsItem property is responsible for showing your plugin in the <em>setting\/extensions<\/em> menu in Shopware. The routes property is responsible for registering your components to its particular route.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"618\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Admin_Setting-1200x618.png\" alt=\"plugin in shopware\" class=\"wp-image-398043\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Admin_Setting-1200x618.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Admin_Setting-300x154.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Admin_Setting-250x129.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Admin_Setting-768x395.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/09\/Admin_Setting.png 1288w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Blog module link under <em>settings\/extensions<\/em> section.<\/figcaption><\/figure>\n\n\n\n<p>Make your components and import those in the<em> main.js file <\/em>then use the<em> <\/em><strong>routes<\/strong> key for registering them to their respective routes. For a detailed explanation of components refer to <a href=\"https:\/\/developer.shopware.com\/docs\/guides\/plugins\/plugins\/administration\/add-custom-component\">How to add components<\/a> and for modules refer to <a href=\"https:\/\/webkul.com\/blog\/add-new-module-to-administration-in-shopware-6-how-to-add-custom-module-in-shopware-6\/\">How to add a module in Shopware<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Create a controller for Storefront<\/h2>\n\n\n\n<p>For rendering the data from table to storefront we need a controller, here&#8217;s how a controller looks like in Shopware<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">#src\/Controller\/Storefront\/BlogController.php\n\n&lt;?php\n\nnamespace WkBlogPlugin\\Controller\\Storefront;\n\nuse Symfony\\Component\\Routing\\Annotation\\Route;\nuse Shopware\\Storefront\\Controller\\StorefrontController;\nuse Shopware\\Core\\System\\SalesChannel\\SalesChannelContext;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\n\/**\n * @Route(defaults={&quot;_routeScope&quot;={&quot;storefront&quot;}})\n *\/\nclass BlogController extends StorefrontController{\n\n    private EntityRepository $blogRepository;\n    public function __construct(\n        EntityRepository $blogRepository\n    ){\n        $this-&gt;blogRepository = $blogRepository;\n    }\n\n    \/**\n     * \n     * @Route(&quot;\/blogs&quot;,name=&quot;frontend.blogs.list&quot;,methods={&quot;GET&quot;, &quot;POST&quot;})\n     *\/\n    public function blogs(Request $request): Response {\n        \/\/some logic to get data for blogs\n        $data = &#091;];\n\n        \/\/render storefront and send data to twig file\n        return $this-&gt;renderStorefront(&#039;@wkBlogPlugin\/storefront\/page\/blogs.html.twig&#039;, &#091;\n            &#039;data&#039; =&gt; $data\n        ]);\n    }\n}<\/pre>\n\n\n\n<p>The <strong>_routeScope<\/strong> annotation is crucial while defining the controller. If you want to use it for storefront purposes then define it by <strong><em>&#8220;_routeScope&#8221;={&#8220;storefront&#8221;}<\/em><\/strong> and for using it with administration use <strong><em>&#8220;_routeScope&#8221;={&#8220;api&#8221;}<\/em><\/strong>.<\/p>\n\n\n\n<p>The<strong> services.xml<\/strong> file registers all the <strong>services<\/strong>, <strong>controllers<\/strong>,<strong> entity definitions<\/strong>, <strong>page loaders<\/strong>, <strong>schedulers<\/strong>, etc.,<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;service id=&quot;WkBlogPlugin\\Controller\\Storefront\\BlogController&quot; public=&quot;true&quot;&gt;\n  &lt;tag name=&quot;controller.service_arguments&quot;\/&gt;\n  &lt;argument type=&quot;service&quot; id=&quot;wk_blog.repository&quot;\/&gt;\n   &lt;call method=&quot;setContainer&quot;&gt;\n       &lt;argument type=&quot;service&quot; id=&quot;service_container&quot; \/&gt;\n   &lt;\/call&gt;\n&lt;\/service&gt;<\/pre>\n\n\n\n<p>After adding the controller create the twig file and render the data sent from the controller to that file. For the detailed explanation refer to <a href=\"https:\/\/developer.shopware.com\/docs\/guides\/plugins\/plugins\/storefront\/customize-templates\">the how to add templates in Shopware.<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>To wrap it up, creating a Shopware plugin is a fantastic way to boost your online store&#8217;s capabilities. Leverage the community and official resources, stay creative, and enjoy your coding journey!<\/p>\n\n\n\n<p>If you need custom&nbsp;<a href=\"https:\/\/webkul.com\/shopware-development\/\" target=\"_blank\" rel=\"noreferrer noopener\">Shopware Development Services<\/a>&nbsp;then feel free to&nbsp;<a href=\"https:\/\/webkul.com\/contacts\" target=\"_blank\" rel=\"noreferrer noopener\">reach us<\/a>&nbsp;and also explore our exclusive range of&nbsp;<a href=\"https:\/\/store.webkul.com\/Shopware.html\">Shopware Plugins<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Hello, tech geeks today we will see how to create a plugin in Shopware. Anyone can create a plugin in Shopware in less than 30 minutes. We will create a plugin in Shopware for adding blog functionality to our storefront. Let&#8217;s get started. Prerequisites Before start creating your plugin it is good to have: <a href=\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":553,"featured_media":377636,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-397574","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create a Plugin in Shopware-Webkul Blog<\/title>\n<meta name=\"description\" content=\"Learn how to create a plugin in Shopware in easy steps. Develop your own plugin in Shopware in less than 5 minutes.\" \/>\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\/how-to-create-a-plugin-in-shopware\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create a Plugin in Shopware-Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how to create a plugin in Shopware in easy steps. Develop your own plugin in Shopware in less than 5 minutes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/\" \/>\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=\"2023-09-07T07:06:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-08T11:37:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sahil Jassal\" \/>\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=\"Sahil Jassal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/\"},\"author\":{\"name\":\"Sahil Jassal\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/5ea360163b2e7f5de2f54f0669c71cac\"},\"headline\":\"How to create a Plugin in Shopware\",\"datePublished\":\"2023-09-07T07:06:58+00:00\",\"dateModified\":\"2023-09-08T11:37:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/\"},\"wordCount\":696,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/\",\"name\":\"How to create a Plugin in Shopware-Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png\",\"datePublished\":\"2023-09-07T07:06:58+00:00\",\"dateModified\":\"2023-09-08T11:37:23+00:00\",\"description\":\"Learn how to create a plugin in Shopware in easy steps. Develop your own plugin in Shopware in less than 5 minutes.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png\",\"width\":1200,\"height\":675,\"caption\":\"icons\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create a Plugin in Shopware\"}]},{\"@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\/5ea360163b2e7f5de2f54f0669c71cac\",\"name\":\"Sahil Jassal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/45a97e1535b57511edfea77c52cfe561f372e6087f788cd886be7e1dd2fca943?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\/45a97e1535b57511edfea77c52cfe561f372e6087f788cd886be7e1dd2fca943?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sahil Jassal\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/sahil-jassal021\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create a Plugin in Shopware-Webkul Blog","description":"Learn how to create a plugin in Shopware in easy steps. Develop your own plugin in Shopware in less than 5 minutes.","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\/how-to-create-a-plugin-in-shopware\/","og_locale":"en_US","og_type":"article","og_title":"How to create a Plugin in Shopware-Webkul Blog","og_description":"Learn how to create a plugin in Shopware in easy steps. Develop your own plugin in Shopware in less than 5 minutes.","og_url":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-09-07T07:06:58+00:00","article_modified_time":"2023-09-08T11:37:23+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png","type":"image\/png"}],"author":"Sahil Jassal","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sahil Jassal","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/"},"author":{"name":"Sahil Jassal","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/5ea360163b2e7f5de2f54f0669c71cac"},"headline":"How to create a Plugin in Shopware","datePublished":"2023-09-07T07:06:58+00:00","dateModified":"2023-09-08T11:37:23+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/"},"wordCount":696,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/","url":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/","name":"How to create a Plugin in Shopware-Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png","datePublished":"2023-09-07T07:06:58+00:00","dateModified":"2023-09-08T11:37:23+00:00","description":"Learn how to create a plugin in Shopware in easy steps. Develop your own plugin in Shopware in less than 5 minutes.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/04\/icons.png","width":1200,"height":675,"caption":"icons"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-create-a-plugin-in-shopware\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to create a Plugin in Shopware"}]},{"@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\/5ea360163b2e7f5de2f54f0669c71cac","name":"Sahil Jassal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/45a97e1535b57511edfea77c52cfe561f372e6087f788cd886be7e1dd2fca943?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\/45a97e1535b57511edfea77c52cfe561f372e6087f788cd886be7e1dd2fca943?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sahil Jassal"},"url":"https:\/\/webkul.com\/blog\/author\/sahil-jassal021\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/397574","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\/553"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=397574"}],"version-history":[{"count":34,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/397574\/revisions"}],"predecessor-version":[{"id":399143,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/397574\/revisions\/399143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/377636"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=397574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=397574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=397574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}