0

I am trying to implement one functionality where logged in user can able to change the billing email address on the time of checkout. I have tried to do that but all the time it updates customer account email address which I don't want. I have tried by updating email from quote & order both before save order function using $quote->getCustomer->setEmail(",,,,,") & $order->getCustomer()->setEmail("...") but unfortunately all the time it updates customer account email address but I need to update customer email id for particular order only (table- sales-flat-order).

Please suggest any solution.

2 Answers 2

2

$quote->getCustomer() retrieved the customer model. The email address for the order / quote is stored in the billing address object and in the quote object.

$quote->getBillingAddress()->setEmail('[email protected]');
$quote->setCustomerEmail('[email protected]');
3
  • unfortunately it didn't work for me.. all the time it's taking customer account email for order. Commented May 22, 2015 at 16:28
  • Updated my answer :) Commented May 22, 2015 at 16:40
  • hmm thats correct ... Commented May 22, 2015 at 18:27
1

I have used like $order->setCustomerEmail('[email protected]'); in saveorder function before save order & it works for me

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.