Guest Order Link
v1.0.0
Guest Order Link
- Updates and support included for 12 months
- License key delivered immediately by email
- 30-day money-back guarantee
- Full documentation included
- Compatible with Hyvä themes
- Composer-ready installation
Guest Order Link
A customer checks out as a guest, then creates an account: "My Orders" is empty. Wimakeit_GuestOrderLink links the orders placed as a guest with the same email address to that account — when the account is created, when the next order is placed, and for the whole order history already in the database.
Linking does not rely on a matching address alone. Magento does not confirm email addresses by default: without a safeguard, registering with a guest buyer's address would be enough to read their orders, addresses and phone number. By default, the module waits until the account holder has clicked a link received at that address.
Who it's for
- Stores that allow guest checkout and get "I can't find my order in my account" tickets
- Merchants who want to move guest buyers to a customer account without losing their history
- Stores whose customers have an account but check out as guests for convenience
- Agencies taking over a catalogue with years of guest orders to link in one pass
Key benefits
- Linking at account creation — a customer who already ordered as a guest receives the "Add your previous orders to your account" email; one click and the orders show up in "My Orders".
- Proof of email ownership — the link is signed, time-limited (7 days by default) and does nothing without a session logged in to that account. Magento's account confirmation and a password reset by email count as proof too. On by default, can be switched off per website.
- Linking at order placement — a guest order placed with the address of an existing account is given to that account when it is placed. The customer finds it in their account without doing anything.
- Addresses compared exactly — the SQL collation treats
name@gmaïl.comandname@gmail.comas equal. The module compares addresses itself: the holder of a look-alike address does not get someone else's orders. - Address book, optional — the shipping and/or billing address of the linked orders is added to the account's address book, without duplicates, and becomes the default only when the account has none.
- Order history catch-up by CLI —
bin/magento wimakeit:guest-orders:link, with a simulation mode (--dry-run), a website or address filter, and a cap per run. Idempotent, and one email per customer for as long as the link is valid: running it again does not chase customers. - "No account exists" message — optionally, the login and forgotten password forms say plainly that no account exists for the address entered and offer to create one, with the form pre-filled.
- Per-website settings, off by default — nothing is linked and no email is sent until the module is enabled on the website. A failure never blocks account creation or the order.
Compatibility
- Magento 2.4.6-p4+ / Mage-OS 3.x
- PHP 8.1 to 8.5
- Requires
wimakeit/module-core^3.2 - No JavaScript or static file: no
setup:static-content:deployneeded,sales_orderis not altered - Tested on the Luma theme; the email and messages go through Magento's standard mechanisms
- Translations bundled for English (en_US), French (fr_FR), Dutch (nl_NL) and Spanish (es_ES)
Install this module via Composer. Make sure your auth.json is configured with your Wimakeit credentials.
$ composer require wimakeit/module-guest-order-link:^1.0.0
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
Installation notes
The standard composer require + setup:upgrade + setup:di:compile flow applies. The points below cover what's specific to this module.
Required dependency
This module requires wimakeit/module-core ^3.2. Composer will pull it automatically from the Wimakeit registry as long as the registry is declared in your project's composer.json.
What the installation changes
- Two tables are created:
wimakeit_guest_order_link_proof(which accounts proved their address; stores a hash, not the address) andwimakeit_guest_order_link_claim(when the last email was sent). sales_orderis not altered.- No JavaScript and no static file:
setup:static-content:deployis not needed for this module.
Nothing happens until you enable it
The module is off by default. While it is off, nothing is linked and no email is sent. Enable it per website under Stores → Configuration → Wimakeit → Guest Order Link, or:
bin/magento config:set --scope=websites --scope-code=<code> wimakeit_guest_order_link/general/enabled 1
bin/magento cache:clean config
ACL permissions
After installation, the following ACL resource is available under System → Permissions → User Roles:
| Resource | Default |
|---|---|
Wimakeit_GuestOrderLink::config (edit module configuration, under Wimakeit) | granted to Administrator role only |
Configuration
All settings are scoped to the website, because a customer account is: a customer who ordered on two store views of the same website gets both orders back.
Guest orders - link to the customer account
| Setting | Default |
|---|---|
| Enable linking | No |
| Require proof of email ownership | Yes |
| Link new guest orders of existing accounts | Yes |
| Also overwrite the order's customer group | No |
| Save the shipping address in the address book | No |
| Save the billing address in the address book | No |
Email "Add your orders to your account"
| Setting | Default |
|---|---|
| Email Sender | General Contact |
| Email Template | the module's template (can be overridden in Marketing → Email Templates) |
| Link lifetime (days) | 7 |
Login - message when no account exists
| Setting | Default |
|---|---|
| Say that no account exists for the address | No |
How proof of email ownership works
With Require proof of email ownership on, guest orders are linked only once the account holder has clicked a link received at the account's address:
| Event | Effect |
|---|---|
| An account is created and guest orders exist for its address | The email is sent |
| The customer clicks the link while logged in to that account | Orders are linked |
Magento account confirmation (when customer/create_account/confirm is on) | Orders are linked, no extra email |
| Password set or reset through the link received by email | Orders are linked |
The link is signed with the installation's encryption key and expires. It does nothing without a session logged in to the account, so a mail scanner opening it triggers nothing. One email is sent per link lifetime, however many guest orders the customer places in the meantime.
Linking the existing order history
At installation no account has proved its address yet. Run the catch-up command once. It covers every website unless you pass --website, and it sends emails only on the websites where linking is enabled:
bin/magento wimakeit:guest-orders:link --dry-run # 1. count, writes nothing, sends nothing
bin/magento wimakeit:guest-orders:link # 2. run
bin/magento wimakeit:guest-orders:link --dry-run # 3. check
| Option | Effect |
|---|---|
--dry-run | Simulation: shows what would be done, writes nothing and sends no email |
--website=<code> / -w <code> | Restricts to one website (code or ID). Default: all |
--email=<address> | Restricts to a single address |
--limit=<n> | Caps the number of accounts processed, to split the work into several runs |
--ignore-proof | Also links accounts that have not proved their address |
-v | Details account by account |
Accounts that have proved their address get their orders linked. The others receive the email, and their orders are linked as they click. The first real run therefore sends one email to each account that has guest orders: check the count with --dry-run first.
Worth knowing
- Turning proof off. Orders are then linked as soon as the account is created, and later guest orders placed with an account's address go straight to it. Only do this on a store where Magento's account confirmation is required: otherwise whoever registers with someone else's address reads that person's guest orders.
- Linking at order placement. Anyone can place a guest order with the address of a proven account, and it lands in that account's history. Nothing leaks from the account, but its holder sees an order they did not place. With the address book options on, the address typed at checkout is also added to the account.
- "No account exists" message. It lets anyone check whether an address has an account, which Magento's native messages avoid on purpose. Forgotten password requests stay rate-limited by Magento. On the login form, enable it only with a captcha (
customer/captcha/forms). - Customer group. The group stored on an order is a snapshot taken at purchase time and it carries a tax class. Overwriting it relabels past sales in reports without recalculating the tax already stored, which is why the option is off by default.
- Order save. Each linked order goes through
OrderRepository::save(): the order grid is resynchronised andsales_order_save_afterobservers run. Test it on a project that exports orders to an ERP on save. - Up to 50 orders are linked per customer action, to keep the request fast. The catch-up command picks up the rest.
- Password reset as proof relies on the core passing the account's email to
AccountManagement::resetPassword(), verified on Magento 2.4.6-p4, 2.4.7 and Mage-OS 3.x. On older cores this path links nothing; the email link and the account confirmation still work. - Large order tables. No index is added on
sales_order.customer_email. Beyond roughly 100,000 orders, add an index on(customer_email, store_id)in your project. - A failure never blocks account creation or the order: it is logged in
var/log/(lines starting withGuest order link:).
Cron jobs
None.
- Version
- v1.0.0
- Support
- 12 months
- Last updated
- Oct 15, 2026
- Magento
- Magento 2.4.4 Magento 2.4.5 Magento 2.4.6 Magento 2.4.7 Mage-OS 2.0 Mage-OS 2.1
- PHP
- PHP 8.1 PHP 8.2 PHP 8.3
- Hyvä
- Compatible
- Package
-
wimakeit/module-guest-order-link
Compatibility checker
Pick your stack to see if this module fits.
Categories: Security, Feature, Fix, Perf, Admin, Deps.
[1.0.0] - 2026-10-02
Feature
- Guest orders linked to the account created afterwards. A customer who ordered as a guest and then creates an account finds those orders in "My Orders", across the store views of the website.
- Linking at order placement. A guest order placed with the email address of an existing account is given to that account when it is placed.
- Address book. Optionally, the shipping and/or billing address of the linked orders is added to the account's address book, without duplicates and without replacing an existing default address.
- Catch-up command.
bin/magento wimakeit:guest-orders:linklinks the existing order history, with a simulation mode and filters by website or address. - "No account exists" message. Optionally, the login and forgotten password forms say that no account exists for the address entered and link to account creation.
Security
- Proof of email ownership, on by default. Orders are linked only after the account holder has clicked a signed, time-limited link received at the account's address, confirmed the account, or reset the password by email. Registering with someone else's address does not give access to their guest orders.
- Exact address comparison. Look-alike addresses that the database treats as equal (
name@gmaïl.comandname@gmail.com) are told apart.
Admin
- Per-website settings under Stores → Configuration → Wimakeit → Guest Order Link. Linking is off by default.
- Translations for English, French, Dutch and Spanish.
Found a bug? Tell us about it.
A short form opens in a new tab — the module name and your language are already filled in. Share what you tried, what went wrong, and we will get back to you within one business day.
Report a bug for Guest Order LinkNeed help?
Our team is available to assist with integration.