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.
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.