My main question is to convert guest to customer
Here is the case:
Assumption: a guest placed an order, he successfully paid for that, when he is on the success page then I want to ask him
Do you want to register
If yes please enter your password. Then he clicks create account
Now I want convert this guest to customer and assign the orders to his new customer id
Please let me know if there is an easy way than using plugins
Best Answer
According magento,there are 3 sales table where magento is save customer related
sales_flat_order
sales_flat_order_address
sales_flat_order_grid
sales_flat_order table
customer_id: here
customer id save
.forguest user
itsave as NULL
.You need toupdate this column by customer id
.customer_is_guest: it
save as 1 when guest
is saved an order and it valueshould be 0 when customer is register
.customer_group_id: Need update customer group by customer group id .
sales_flat_order_grid table
customer_id: here
customer id save
.forguest user
itsave as NULL
.You need toupdate this column by customer id
.sales_flat_order_address
customer_address_id: for
guest user
it value is Null. You need update by customer address id whenever try transfer ordercustomer_id: here
customer id save
.forguest user
itsave as NULL
.You need toupdate this column by customer id
.Code like: