1

In Expresso Store, is it possible to connect orders placed by a guest to a member account with the same email address? The scenario is that a guest places an order, then later wants to create a member account on the site. It would be great to be able to then connect all their previous guest orders to that new member account.

2

Hi directly in the built in system - however, the only thing that relates an order to a member is a single column representing member_id. You could write a small extension to simply iterate through all orders with member_id=0 and query the members table to update them.

Shouldn't take more than an hours work.

Just to flesh this out a little - you should be able to do it with a query pretty close to this:

update exp_store_orders o set o.member_id = (select member_id from exp_members where email = o.order_email) where o.member_id = 0;

That's untested SQL BTW, but should give you a headstart.

| improve this answer | |
  • 1
    Thanks @madebyhippo. That is what I was thinking would probably be needed. I'll whip something up. – caseyreid Apr 22 '15 at 18:33
  • 1
    Store should automatically assign previous guest orders to a newly created member account for you, if a user registers for an account while checking out on another order without the need for an additional extension – Justin Long Apr 22 '15 at 19:20
  • 1
    @JustinLong That did not work for me in my testing. What I did was place some orders as a guest. Later I registered on the site using Freemember using the same email address that I previously placed the orders with. The previous guest orders did not connect. Perhaps that only works if I user the register_member option in Store and as part of the order process? – caseyreid Apr 23 '15 at 19:14
  • 1
    Yea it only works if you register a member through Store while completing an order. – Justin Long Apr 23 '15 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.