Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin-base-guide.md #660

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions guides/plugins/plugins/plugin-base-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ Using a prefix for your plugin name is not just a convention we'd recommend, but

Now that you've found your name, it's time to actually create your plugin.

Shopware provides a handy command that you can use to generate the plugin structure. Go to your shopware project's root directory and run the following command:

```
zaifastafa marked this conversation as resolved.
Show resolved Hide resolved
bin/console plugin:create SwagBasicExample
```

You can pass an addition flag `-c` or `--create-config` in the above command which would also create a demo configuration file in the `Resources` directory. The command will generate all the basic required files that are needed for an extension to be installed on a Shopware instance. Make sure to adjust the namespace in the files as per your need.

If you want to create the structure manually please follow the instructions below:

For this, please navigate to the directory `custom/plugins`, that you should find in your Shopware 6 installation. Inside the `plugins` directory, create a new directory named after your plugin, so it should look like this: `custom/plugins/SwagBasicExample`

By convention, you'll have another directory in there, which is called `src`. This is not required, but recommended. And that's it for the directory structure for now.
Expand Down