Exact, scope-aware matching
Resolves the customer from the email already stored on the order and respects Magento's global or per-website customer sharing scope.
Give authorised Magento administrators a deliberate, reviewable way to connect one eligible guest order to the exact matching customer account.
Why it exists
When a shopper registers separately after guest checkout, Magento can leave the earlier order unassigned. Support needs a controlled way to fix that one record without turning an email match into automatic ownership.
Resolves the customer from the email already stored on the order and respects Magento's global or per-website customer sharing scope.
Shows the action only for eligible orders and presents the resolved order and account for confirmation before anything changes.
Revalidates the order, customer match, assignment state, scope, and permission immediately before saving.
Uses Magento's customer-assignment service instead of direct SQL and refreshes only the affected sales grid records.
Uses a per-order lock and adds a private history comment with the trusted Admin display name, without customer IDs or email addresses.
Adds no database tables, storefront assets, telemetry, external requests, bulk linking, or customer-facing linking endpoint.
Admin workflow
The visible action stays short while the server repeats the important checks immediately before the write.
Magento shows Link Guest Order to Customer only when the order is still unassigned and an exact eligible account exists.
The confirmation page shows the order and the server-resolved customer account before the administrator submits the change.
The module checks eligibility again, takes a per-order lock, uses Magento's native assignment service, and records a private audit comment.
Eligibility
Safety boundaries
Installation and compatibility
The package constraints start with Magento 2.4.4-era components and PHP 8.1. Magento 2.4.6-p12 on PHP 8.3 is the verified runtime. Test other compatible combinations in a disposable environment before production use.
| Magento | PHP |
|---|---|
| 2.4.6-p12 · verified | 8.3 |
| 2.4.4+ · Composer constraint | Magento-supported PHP 8.1+ |
Use a PHP version supported by your exact Magento release. Review existing order, customer, and Admin customisations, then back up the store and test the assignment workflow outside production first.
Recommended
composer require haroone/module-link-guest-order-to-customer:^1.0Alternative
Place the complete module files in this directory from the Magento root:
app/code/Haroone/LinkGuestOrderToCustomerMagento setup
bin/magento module:enable Haroone_LinkGuestOrderToCustomer
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:cleanRun DI compilation in production mode. The module adds no database tables or storefront assets, so reindexing and static-content deployment are not required.
FAQ
These answers cover the workflow, eligibility rules, and data boundaries that matter before adoption.
No. It links one eligible order at a time after an authorised administrator reviews and confirms the exact assignment.
No. The server resolves the customer from the email already stored on the order and never trusts a submitted customer ID.
The customer must exist within the order website's applicable sharing scope. The module does not link the order across websites.
No. Existing customer assignments are rejected, and the same rule is checked again immediately before saving.
The assignment connects the order to the account. Storefront visibility still follows Magento's existing order-status visibility configuration.
It changes only the customer assignment. It does not change order state, status, totals, payment, addresses, quote, items, or global configuration.
No. The module has no declarative schema and no storefront assets. Run setup:upgrade, compile DI in production mode, and clean Magento cache.
Support and engineering
For store-specific customer, order, checkout, integration, or migration work, share the real Magento context so compatibility and ownership boundaries can be reviewed first.