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 linking.
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 to Customer Account only when the order is still unassigned and an exact eligible account exists.
The confirmation page shows the guest order and matched customer account before the administrator makes the permanent assignment.
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 has been runtime-verified, and Magento 2.4.7-p10 on PHP 8.3 has passed the clean CI suite. Test other compatible combinations in a disposable environment before production use.
| Magento | PHP |
|---|---|
| 2.4.7-p10 · CI verified | 8.3 |
| 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.
Install from Packagist or inspect the tagged source and verified ZIP on GitHub.
Recommended
composer require haroone/module-link-guest-order-to-customer:^1.0.2Alternative
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.
Existing installation
composer update haroone/module-link-guest-order-to-customer
composer show haroone/module-link-guest-order-to-customer
bin/magento cache:clean config layout block_htmlFor a manual installation, replace the entire module directory with the latest release ZIP instead of merging old and new files. Review the release notes before every update.
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 linking.
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.
Update only haroone/module-link-guest-order-to-customer, confirm the resolved version with composer show, and clean the config, layout, and block_html cache types. Review the release notes before each update.
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.