How to assign a Guest Order to a Customer using Using SQL- Magento 2 - Magento source24


How to assign a Guest Order to a Customer using Using SQL- Magento 2 -  Magento source24


How to assign a Guest Order to a Customer using Using SQL- Magento 2 -  Magento source24


In this Blog post im share with you to code How to assign a Guest Order to a Customer using Using SQL- Magento 2 - 

in this sql query i'm update two table sales_order  and sales_order_grid  to set order to customer.

this query is required CUSTOMER ID and  ORDER ID.


SQL 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};


In bellow SQL Query we are update the table downloadable_link_purchased : 


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};

UPDATE downloadable_link_purchased SET customer_id = {YOUR CUSTOMER ID} WHERE order_id = {YOUR ORDER ID};




Deepak Kumar Bind

Success is peace of mind, which is a direct result of self-satisfaction in knowing you made the effort to become the best of which you are capable.

Post a Comment

If you liked this post please do not forget to leave a comment. Thanks

Previous Post Next Post