kommandhub / foundation-sw
Kommandhub Foundation plugin for Shopware
Package info
github.com/KommandHub/foundation-sw
Type:shopware-platform-plugin
pkg:composer/kommandhub/foundation-sw
Requires
- shopware/core: ~6.6.0 || ~6.7.0
- shopware/fixture-bundle: ^0.1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.94
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- rregeer/phpunit-coverage-check: ^0.3.1
- shopware/dev-tools: ^1.5
README
A shared Shopware 6 foundation plugin that provides reusable installer infrastructure for Kommandhub extensions. It keeps country, state, currency, and language data inside providers and installs them only when explicitly requested by the merchant.
Developed with ❤️ by Kommandhub Limited
Table of Contents
- Features
- Supported Data
- Requirements
- Installation
- Usage
- Directory Structure
- Development & Testing
- Compatibility
- Troubleshooting
- Support
- License
Features
- Provider-based installation for countries, states, currencies, and languages
- Idempotent installers that avoid duplicates by natural keys
- Dedicated Shopware Admin module under the Plugins settings group
- Extensible architecture for adding new providers without changing installer flow
- Admin translations for en-GB, de-DE, and fr-FR
Supported Data
The plugin currently focuses on African base data:
- African countries
- Country states/provinces
- Country currencies
- African languages/locales
Requirements
- Shopware:
~6.6.0or~6.7.0 - PHP:
^8.2(inside Docker) /^8.4(local) - Composer
Installation
Via Composer (Recommended)
composer require kommandhub/foundation-sw bin/console plugin:refresh bin/console plugin:install --activate KommandhubFoundationSW bin/console cache:clear
Manual Installation (GitHub Upload)
-
Download the ZIP from the repository.
-
Ensure the plugin structure is preserved:
KommandhubFoundationSW.zip ├── src/ ├── composer.json └── README.md -
Upload it via:
Administration → Extensions → My Extensions → Upload Extension
-
Install and activate the plugin.
Usage
Open the administration page:
Administration → Settings → Plugins → Africa Base Data Installer
Then:
- Select the countries or languages you want to install.
- Click Install.
- The plugin inserts the selected base data into the appropriate Shopware tables.
Directory Structure
The plugin uses a feature-based structure:
KommandhubFoundationSW/
├── src/
│ ├── Controller/
│ │ └── Api/
│ │ └── Installer/
│ ├── Service/
│ │ └── Installers/
│ │ ├── Address/
│ │ │ └── Country/
│ │ └── Language/
│ └── Resources/
│ ├── config/
│ └── app/administration/
└── tests/
└── Unit/
What each area is for
Controller/: API endpoints used by the admin UI.Service/Installers/: provider registries and installer logic.Resources/config/: service wiring, routes, and plugin configuration.Resources/app/administration/: admin components, module, and snippets.tests/: unit tests for installer behavior.
Development & Testing
To keep the environment consistent, run development tools inside the project Docker container.
1. Setup Development Environment
cd custom/plugins/KommandhubFoundationSW
make up
make shell
make prepare
2. Run Development Commands
Run PHPUnit Tests
make test
Run Tests with Coverage
make test-coverage
Static Analysis (PHPStan)
make analyse
Code Style (PHP-CS-Fixer)
make cs make cs-fix
Compatibility
| Plugin Version | Shopware Version |
|---|---|
| ^1.0 | 6.6 |
| ^1.0 | 6.7 |
Troubleshooting
Installer page not visible?
bin/console plugin:refresh bin/console cache:clear
Changes not reflected in Administration?
- Rebuild the administration assets.
- Clear the cache.
- Refresh the browser.
No data appears after installation?
- Ensure the selected providers were installed.
- Confirm the provider data exists in the plugin source.
- Check the logs in
var/log/.
Support
For support:
- Email: admin@kommandhub.com
- Website: https://kommandhub.com
License
This project is licensed under the Proprietary license.
See the composer.json file for details.
