Skip to content

Commit

Permalink
Update plugin-base-guide.md (#660)
Browse files Browse the repository at this point in the history
* Update plugin-base-guide.md

Fixes #518

* Add language in code block
  • Loading branch information
zaifastafa authored Aug 17, 2022
1 parent 18f7ac1 commit 2175d66
Showing 1 changed file with 10 additions and 0 deletions.
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:

```bash
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

0 comments on commit 2175d66

Please sign in to comment.