helloagain/shopware6

hello again Shopware 6 Plugin

Maintainers

Package info

gitlab.com/helloagainpublic/connectors/shopware-6

Homepage

Issues

Type:shopware-platform-plugin

pkg:composer/helloagain/shopware6

Transparency log

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

v1.9.1 2026-06-30 12:49 UTC

This package is auto-updated.

Last update: 2026-06-30 12:52:35 UTC


README

Integrates Shopware 6 stores with the hello again customer loyalty platform.

Features

  • OAuth 2.0 authentication — connect a hello again app account with a Shopware shop account via the OAuth 2.0 Authorization Code flow.
  • Automatic point awarding — completed orders are tracked and synced to hello again so customers earn points without manual intervention.
  • Webview SSO — auto-login app users in a webview by linking them to the /hla/session/init endpoint with a helloagain_token query parameter.
  • Headless API — the OAuth and SSO flows are also exposed as Store API endpoints for headless / mobile frontends. See docs/HEADLESS.md.

Installation

The plugin syncs completed orders to hello again on a schedule. There are two ways to drive that schedule; pick whichever fits your hosting setup.

Task handler (preferred)

Uses Shopware's built-in scheduled-task system. Recommended for any shop that already runs a Symfony Messenger worker.

  1. In the Shopware admin, go to Settings → System → Scheduled Tasks and ensure the HelloAgain Order Export task is active (set the desired interval).
  2. Make sure a worker process is running:
    bin/console messenger:consume scheduler_default --time-limit=300
    

    In production this is typically supervised by systemd or supervisord.

Cron (fallback)

If you don't have a Messenger worker, schedule the console command directly via your system cron:

*/5 * * * * /path/to/shopware/bin/console helloagain:data-export

Shopware Version Support

Shopware versionBranchStatus
6.7mainactive
6.6shopware-6.6active
6.5shopware-6.5deprecated
6.4shopware-6.4deprecated

Releases

Releases are tag-driven and produced by GitLab CI:

./release.sh <plugin-version>      # e.g. ./release.sh 1.8.0

The script is branch-aware:

  • On main (Shopware 6.7), the tag is plain vX.Y.Z. These tags are also published to Packagist (see "Publishing to Packagist" below).
  • On shopware-6.6 / shopware-6.5 / shopware-6.4, the tag is vX.Y.Z-sw<major>.<minor> (e.g. v1.8.0-sw6.6). These branches are not published to Packagist; the GitLab Release ZIP is the distribution channel.

In both cases CI builds the plugin ZIP on the tag push and attaches it to a GitLab Release, downloadable from the project's Releases page.

Publishing to Packagist

Only the main branch is published to Packagist, as helloagain/shopware6.

git.mstage.at (private, dev)
   │  (manual: git push public main + tag)
   ▼
gitlab.com/helloagainpublic/connectors/shopware-6 (public)
   │  (manual: trigger Packagist update)
   ▼
packagist.org/packages/helloagain/shopware6

Steps to cut a release on main (e.g. X.Y.Z):

  1. Land all changes for the release on main (via MR, CI green) and update your local checkout:
    git checkout main && git pull --ff-only
    
  2. Tag and push to origin with ./release.sh X.Y.Z. CI builds the internal GitLab Release artifact.
  3. Push main and the new tag to the public gitlab.com mirror:

    # one-time per machine: add the mirror as a remote
    git remote add public git@gitlab.com:helloagainpublic/connectors/shopware-6.git
    
    git push public main
    git push public vX.Y.Z
    
  4. Trigger Packagist to crawl the new tag — either click Update on https://packagist.org/packages/helloagain/shopware6, or:
    curl -XPOST -H 'content-type:application/json' \
      "https://packagist.org/api/update-package?username=<your-user>&apiToken=<token>" \
      -d '{"repository":{"url":"https://gitlab.com/helloagainpublic/connectors/shopware-6"}}'
    
  5. Verify on https://packagist.org/packages/helloagain/shopware6 that X.Y.Z is listed.

Releases on shopware-6.6 / shopware-6.5 / shopware-6.4 are not mirrored or published to Packagist — distribution stays via the GitLab Release ZIP.

Versioning

Plugin versions are aligned across Shopware branches: the same X.Y.Z is used everywhere a release ships. On legacy branches the Shopware version lives in the tag suffix (-sw6.4 / -sw6.5 / -sw6.6); on main the tag is plain vX.Y.Z (no suffix) because Packagist requires plain semver. Bug fixes that only apply to one branch bump only that branch's tag — versions may drift slightly until the next change that ships everywhere realigns them.

Development

Run the order export manually:

bin/console helloagain:data-export

Useful for forcing a sync without waiting for the scheduled task or cron interval.

Testing

Automated PHPUnit tests live in tests/ and cover the plugin's services, listener, command, and repositories with mocked Shopware dependencies (no database, no Shopware kernel needed).

One-time setup:

composer install --no-security-blocking --ignore-platform-reqs
  • --no-security-blocking is required because the plugin's firebase/php-jwt dependency has an open Packagist advisory we can't bump without a breaking change.
  • --ignore-platform-reqs lets composer install regardless of which Shopware-required PHP extensions (gd, intl, pdo_mysql, …) are present locally — the unit tests mock every Shopware service and never touch them.

Run the suite:

composer test

With coverage (requires pcov or xdebug PHP extension):

./vendor/bin/phpunit --coverage-html var/coverage --coverage-text

Test layout mirrors src/:

tests/
├── TestCase.php          # Shared base with mock builders (makeDataHelper, fakeOrder, …)
├── Service/
├── Listener/
├── Command/
├── Models/
└── Exception/

Configuration Endpoints

Configure these URIs in your hello again dashboard:

OAuth2 Authorize URI:    BASEURL/hla/oauth2/authorize
OAuth2 Token URI:        BASEURL/hla/oauth2/token
Webview SSO URI:         BASEURL/hla/session/init?helloagain_token={{externalToken}}
Webview with Redirect:   BASEURL/hla/session/init?helloagain_token={{externalToken}}&redirect_uri={{redirectUrl}}

Support

Additional Documentation

  • CLAUDE.md — detailed technical documentation, architecture overview, and development guidelines.
  • docs/HEADLESS.md — Store API integration guide for headless / mobile frontends.
  • docs/TESTING.md — manual end-to-end testing guide for OAuth, SSO, and order points export.
  • docs/postman/ — Postman collection for OAuth, SSO, and order export testing.

API References