custom/plugins, that you should find in your Shopware 6 installation. Inside the
pluginsdirectory, create a new directory named after your plugin, so it should look like this:
src. This is not required, but recommended. And that's it for the directory structure for now.
srcdirectory, create a PHP class named after your plugin,
SwagBasicExample.php. This new class
SwagBasicExamplehas to extend from Shopware's abstract Plugin class, which is
guidethis would be:
composer.jsonfile inside your plugin's root directory.
typehas to be
shopware-platform-plugin, so Shopware can safely recognize your plugin as such and the
requirefield must include at least
shopware/core, to check for compatibility.
composer.jsonfor this guide, which will do the trick:
shopware-plugin-classinformation. This has to point to the plugin's base PHP class. The one, that you've previously created.
composer.jsonfile, but you can safely ignore that. You should end up with a list like the following: