{"id":6649,"date":"2020-11-13T04:39:25","date_gmt":"2020-11-13T04:39:25","guid":{"rendered":"https:\/\/www.bay20.com\/?p=6649"},"modified":"2025-05-01T17:59:53","modified_gmt":"2025-05-01T12:14:53","slug":"so-erstellen-sie-ein-einfaches-plugin-in-shopware-5","status":"publish","type":"post","link":"https:\/\/www.bay20.com\/de\/so-erstellen-sie-ein-einfaches-plugin-in-shopware-5\/","title":{"rendered":"Wie erstellt man ein einfaches Plugin in Shopware 5?"},"content":{"rendered":"\n<p>Ein Shopware Plugin ist eine Gruppe von Dateien, die ben\u00f6tigt werden, um eine bestimmte Shop-Funktion zu erstellen. Es ist die Einheit der Anpassung in der <a href=\"https:\/\/www.bay20.com\/shopware-development\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Shopware-Plattform<\/strong><\/a>. Shopware Plugins k\u00f6nnen erstellt werden, um mehrere Funktionen mit unterst\u00fctzender Logik auszuf\u00fchren, um die Benutzererfahrung und das Erscheinungsbild des Shops zu beeinflussen. Aus der Sicht von H\u00e4ndlern und Erweiterungsentwicklern sind Plugins die zentrale Einheit der Shopware-Plattform.<\/p>\n\n\n\n<p><strong>Dateistruktur des Plugins:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"295\" height=\"164\" src=\"https:\/\/www.bay20.com\/wp-content\/uploads\/2020\/11\/Screenshot_1.png\" alt=\"\" class=\"wp-image-6652\"\/><\/figure>\n\n\n\n<p><strong>Schritt 1:<\/strong> Wechseln Sie in das Stammverzeichnis Ihrer Website.<\/p>\n\n\n\n<p><strong>Schritt 2:<\/strong> Navigieren Sie zum Pfad <strong>Benutzerdefiniert -> Plugins.<\/strong><\/p>\n\n\n\n<p><strong>Schritt 3:<\/strong> Erstellen Sie Ihren Plugin-Ordner wie (NewCustom).<\/p>\n\n\n\n<p><strong>Schritt 4:<\/strong> Erstellen Sie eine PHP-Datei, die erforderlich ist. Wie NewCustom.php in diesem Pfad (Root_Path\/custom\/plugins\/NewCustom\/NewCustom.php).<\/p>\n\n\n\n<pre class=\"wp-block-verse\">&lt;?php\n\nnamespace NewCustom;\n\nuse Shopware\\Components\\Plugin;\n\nclass NewCustom extends Plugin\n{\n          # Your code goes here\u2026\n}<\/pre>\n\n\n\n<p><strong>Schritt 5:<\/strong> Erstellen Sie eine XML-Datei, die erforderlich ist. Wie plugin.xml in diesem Pfad (Root_Path\/custom\/plugins\/NewCustom\/plugin.xml).<\/p>\n\n\n\n<pre class=\"wp-block-verse\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;plugin xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n        xsi:noNamespaceSchemaLocation=\"https:\/\/raw.githubusercontent.com\/shopware\/\n        shopware\/5.3\/engine\/Shopware\/Components\/Plugin\/schema\/plugin.xsd\"&gt;\n\n                 &lt;label lang=\"en\"&gt;NewCustom&lt;\/label&gt;\n                 &lt;version&gt;0.0.1&lt;\/version&gt;\n                 &lt;link&gt;http:\/\/example.com&lt;\/link&gt;\n                 &lt;author&gt;Name of the author&lt;\/author&gt;\n&lt;\/plugin&gt;<\/pre>\n\n\n\n<p><strong>Schritt 6: <\/strong>Um das Plugin zu installieren und zu aktivieren, k\u00f6nnen Sie dies \u00fcber das Backend oder per SSH-Befehl tun:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">php bin\/console sw:plugin:install NewCustom --activate<\/pre>\n\n\n\n<p>F\u00fcr jegliche Unterst\u00fctzung zu Shopware senden Sie uns bitte eine E-Mail an <a href=\"mailto:manish@bay20.com\" title=\"mailto:manish@bay20.com\">manish@bay20.com<\/a> oder Whatsapp an <a href=\"tel:+91-8800519180\" title=\"tel:+91-8800519180\">+91-8800519180<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ein Shopware Plugin ist eine Gruppe von Dateien, die ben\u00f6tigt werden, um eine bestimmte Shop-Funktion zu erstellen. Es ist die Einheit der Anpassung in der Shopware-Plattform. Shopware Plugins k\u00f6nnen erstellt werden, um mehrere Funktionen mit unterst\u00fctzender Logik auszuf\u00fchren, um die Benutzererfahrung und das Erscheinungsbild des Shops zu beeinflussen. Aus der Sicht von H\u00e4ndlern und Erweiterungsentwicklern [&hellip;]<\/p>\n","protected":false},"author":30,"featured_media":6689,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78,116],"tags":[],"class_list":["post-6649","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shopware","category-shopware-5"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/6649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/comments?post=6649"}],"version-history":[{"count":30,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/6649\/revisions"}],"predecessor-version":[{"id":16625,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/6649\/revisions\/16625"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media\/6689"}],"wp:attachment":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media?parent=6649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/categories?post=6649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/tags?post=6649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}