I want to link a guest order to a existing account in Magento. Does someone know which fields on which tables I have to change to accomplish this?
Is there maybe a easier way?
This also seem to work..
$order_id = 5; // Your Order ID
$customer_id = 7; //Customer ID
$_order = Mage::getModel('sales/order')->load($order_id);
if($_order->getCustomerId() == NULL){
$_order->setCustomerId($customer_id);
$_order->save();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With