3

Running Magento 2.1.2

Is there any way in Magento 2 to assign orders to main customer accounts, as lately my customer placed a guest order and asked me to reassign this order to the main account?

Any help would be greatly appreciated. Thanks.

1

3 Answers 3

0

If you need an extension for magento 2 the following one may help to assign orders - https://www.itoris.com/magento-2-reassign-order.html It adds a button in order for admin to change the order owner.

0
2

By using some mysql queryies, you can reassign guest orders to customer.

Magento save relation between customer and order in sales_order table and sales_order_grid table by using customer_id column.

In Order to assign you need a order to customer, you need run below query

update sales_order set customer_id = [YOUR_Customer_Id], customer_is_guest=
0 where entity_id=[Your_order_id]




update sales_order_grid set customer_id = [YOUR_Customer_Id]
where entity_id=[Your_order_id]
2
  • Thanks! I will try that. But it would be great to automate it in future if we have the same issue again. Do you have an idea if there any module for that? Jan 3, 2017 at 16:42
  • but, also please check @marius explainaton
    – Amit Bera
    Jan 3, 2017 at 16:43
1

If you want a one time only thing you can just find the customer id you need and update the order record from sales_order table by setting the field customer_id to the value you found above.
If you want a long time automated version is not that easy and I don't have a solution for it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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