Reputation: 21
On order-confirmation page, it says 'An e-mail has been sent to you with this information.'
I want to show the recievers email
'An e-mail has been sent to your email [email protected] with this information.
Where to change this
Upvotes: 2
Views: 7142
Reputation: 966
You need override OrderConfirmationController::process() with this code:
public function process()
{
parent::process();
self::$smarty->assign(array(
'is_guest' => self::$cookie->is_guest,
'HOOK_ORDER_CONFIRMATION' => Hook::orderConfirmation((int)($this->id_order)),
'HOOK_PAYMENT_RETURN' => Hook::paymentReturn((int)($this->id_order), (int)($this->id_module))
));
$order = new Order((int)($this->id_order)); //create order object
$customer = new Customer((int)($order->id_customer)); //create customer object
if (self::$cookie->is_guest)
{
self::$smarty->assign(array(
'id_order' => $this->id_order,
'customer' => $customer, //assign variable
'id_order_formatted' => sprintf('#%06d', $this->id_order)
));
/* If guest we clear the cookie for security reason */
self::$cookie->mylogout();
}
}
After that you'll be able to use {$customer->email}
for receiving customers e-mail in order-confirmation.tpl of your theme.
Regards
Upvotes: 0