Skip to content

Commit

Permalink
Readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
simkli committed Sep 10, 2016
1 parent 557a636 commit 9017bf6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Commands/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ abstract class Command extends ShopwareCommand {
*/
protected function getService() {
if ($this->service == null) {
$this->service = $this->container->get('simklthemeimportexport.theme_import_export_service');
$this->service = $this->container->get(
'simklthemeimportexport.theme_import_export_service');
}
return $this->service;
}
Expand Down
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,34 @@ git clone https://github.com/simkli/SimklThemeSettingExport.git
2) Log in to your Shopware backend and activate the plugin in the Shopware Plugin Manager.

## Usage
You'll find a new button in the theme configuration menu called "Ex/Import". This will open a new window containing a json string of your current theme configuration. You can copy&past this string to any other theme installed to inherit the current configuration.
### Shopware Backend
This plugins extends the Shopware Theme Manager and allows you to export and import
configuration of themes.
![Image](http://i.imgur.com/YVy4qhQ.jpg)

### Via Commandline
Using the Shopware CLI you can easily import or export configurations. This can be useful
for deployment. Following commands are available:
`$ ./bin/console sw:theme:export:configuration <theme> <shop>`
`$ ./bin/console sw:theme:import:configuration <theme> <shop>`
You can use the ID or name of the shop/theme as argument.
#### Example Import
`$ ./bin/console sw:theme:import:configuration Responsive English < my_config.theme`

### For Developers
If you're plaing on releasing a theme you can use this plugin to import a example
configuration for your customers. For example in your plugin's bootstrap:

```php
if ($this->assertRequiredPluginsPresent(['SimklThemeSettingExport']) {
$service = $this->get('simklthemeimportexport.theme_import_export_service');
$service->setThemeSettingsArray($yourThemeModel, $shop, [
'brand-primary' => '#FFF',
'brand-secondary' => '#000'
// ...
]);
}
```

![Image](https://dl.dropboxusercontent.com/u/2419584/things/themeplugin.png)
## License
This plugin is distributed under the GNU Affero General Public License v3.

0 comments on commit 9017bf6

Please sign in to comment.