Search code examples
phpmagentophpmyadminmagento-1.7

Modify Guest Order Email Address


I have a guest order in my Magneto system that I need to now modify the email address on file. The customer as mentioned did not create an account so I believe I will need to modify the MySQL tables directly. Can anyone point me in the right direction for what tables I need to modify?

I see an email address in "sales_flat_order", "sales_flat_order_address", and "sales_flat_quote", etc but I am not sure what to edit. Are there any ramifications I need to be aware of when doing this kind of edit?

Thanks!

I am using Magneto Community 1.7.0.2.


Solution

  • For data consistency you could change all 3, sales_flat_order should be the one that show up on order detail page in admin.

    You could also change it by order number

    $order = Mage::getModel('sales/order')->load($order_id);
    $order->setCustomerEmail($email_address)->save();