PHPackages                             laenen/sw6-guest-merge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. laenen/sw6-guest-merge

ActiveShopware-platform-plugin[Authentication &amp; Authorization](/categories/authentication)

laenen/sw6-guest-merge
======================

Merge guest orders into authenticated Laenen customer accounts via verified email or trusted CSR action.

v6.0.2(4w ago)1203↓50%proprietaryPHP

Since Apr 22Pushed 4w agoCompare

[ Source](https://github.com/runelaenen/sw6-guest-merge)[ Packagist](https://packagist.org/packages/laenen/sw6-guest-merge)[ RSS](/packages/laenen-sw6-guest-merge/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Guest Merge plugin for Shopware 6
=================================

[](#guest-merge-plugin-for-shopware-6)

Merge guest orders into authenticated customer accounts with verified inbox ownership, while keeping Shopware core intact.

What it does
------------

[](#what-it-does)

When a customer who previously checked out as a guest later creates (or already has) an authenticated account using the same email address, this plugin moves those guest orders under the authenticated account so they appear in order history, contribute to lifetime value metrics, and can be acted on from the admin panel.

Three merge paths (per the requirements thread)
-----------------------------------------------

[](#three-merge-paths-per-the-requirements-thread)

PathWho initiatesVerificationWhen to use**Email link** (storefront)Customer (self-service) or CSR via adminCustomer clicks confirmation linkDefault &amp; most common**Verbal code** (admin)CSR via admin tabCSR enters code customer reads from email aloudPhone support**Trusted CSR direct** (admin, gated)CSR via admin tabNone - audit trail onlyLong-standing customers, identity already establishedThe third path is **off by default**. Enable it under *Settings → Plugins → Laenen Guest Merge → CSR / Admin* and grant the `laenen_guest_merge.trusted` privilege only to CSRs you trust to verify identity by other means.

Installation
------------

[](#installation)

```
# Place the plugin folder under custom/plugins/
cp -R LaenenGuestMerge custom/plugins/
# Or install via composer
composer require laenen/sw6-guest-merge

# Refresh and install
bin/console plugin:refresh
bin/console plugin:install --activate LaenenGuestMerge
bin/console cache:clear

# Build assets
./bin/build-js.sh
bin/console theme:compile
```

What gets updated on 'Merge'?
-----------------------------

[](#what-gets-updated-on-merge)

OperationTableWhy`UPDATE` `customer_id``order_customer`Re-link orders to auth customer`UPDATE` aggregates`customer` (auth row)Recompute order\_count, order\_total\_amount, last\_order\_date`DELETE` (DAL)`customer` (guest rows)Remove now-orphaned guest customer records (cascades guest addresses, customer\_recovery, etc.)What is NOT touched on 'Merge'?
-------------------------------

[](#what-is-not-touched-on-merge)

- `customer.default_billing_address_id`, `default_shipping_address_id`, `default_payment_method_id` of the authenticated account
- The authenticated account's address book or saved payment methods
- The `order`, `order_address`, `order_transaction`, `order_line_item` rows
- Order snapshot fields on `order_customer` (email, first/last name, customer\_number) - these stay as the buyer entered them at checkout

Configuration reference
-----------------------

[](#configuration-reference)

See `src/Resources/config/config.xml`.
Key settings:

- **tokenLifetimeHours** (default `24`) - how long verification links/codes stay valid
- **restrictToSameSalesChannel** (default `false`) - restrict to same SC as auth account
- **sendCompletionEmail** (default `true`) - send "merge complete" mail
- **allowSelfServiceInitiation** (default `true`) - show storefront entry under My Account
- **showRegistrationHint** (default `true`) - flash message after register if guest orders exist
- **allowDirectMergeForTrustedCsr** (default `false`) - enable CSR override path

Events for downstream integrations
----------------------------------

[](#events-for-downstream-integrations)

- `Laenen\GuestMerge\Event\GuestOrderMergeRequestedEvent`
- `Laenen\GuestMerge\Event\GuestOrderMergeConfirmedEvent`
- `Laenen\GuestMerge\Event\GuestOrderMergedEvent` (final, post-merge)

After a merge, downstream systems should re-sync the auth customer profile and the affected orders. The `GuestOrderMergedEvent` payload includes `movedOrderIds` and `deletedGuestIds`.

Admin API quick reference
-------------------------

[](#admin-api-quick-reference)

```
GET  /api/_action/laenen/guest-merge/preview/{customerId}
POST /api/_action/laenen/guest-merge/initiate/{customerId}
POST /api/_action/laenen/guest-merge/verify-code/{customerId}    body: { "code": "ABCD2345" }
POST /api/_action/laenen/guest-merge/cancel/{customerId}
POST /api/_action/laenen/guest-merge/direct-merge/{customerId}   ACL: laenen_guest_merge.trusted

```

Storefront routes
-----------------

[](#storefront-routes)

```
GET  /account/merge-guest-orders                       - self-service entry page
POST /account/merge-guest-orders/initiate              - send verification email
GET  /account/merge-guest-orders/confirm/{token}       - confirmation landing page
POST /account/merge-guest-orders/confirm/{token}       - execute merge

```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance94

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Total

3

Last Release

28d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3930922?v=4)[Rune Laenen](/maintainers/runelaenen)[@runelaenen](https://github.com/runelaenen)

---

Top Contributors

[![runelaenen](https://avatars.githubusercontent.com/u/3930922?v=4)](https://github.com/runelaenen "runelaenen (5 commits)")

### Embed Badge

![Health badge](/badges/laenen-sw6-guest-merge/health.svg)

```
[![Health](https://phpackages.com/badges/laenen-sw6-guest-merge/health.svg)](https://phpackages.com/packages/laenen-sw6-guest-merge)
```

###  Alternatives

[shopware/production

177202.8k](/packages/shopware-production)[unzerdev/shopware6

Unzer payment integration for Shopware 6

1230.4k](/packages/unzerdev-shopware6)[kiener/mollie-payments-plugin

Mollie Payments

6562.4k](/packages/kiener-mollie-payments-plugin)[werkstattl/openblogware

OpenBlogware: A Blog Module for Shopware 6.

437.4k](/packages/werkstattl-openblogware)[adyen/adyen-shopware6

Official Shopware 6 Plugin to connect to Payment Service Provider Adyen

24115.8k](/packages/adyen-adyen-shopware6)[shopware/storefront

Storefront for Shopware

684.4M207](/packages/shopware-storefront)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
