gofer_p Posted August 23, 2010 Share Posted August 23, 2010 I want to add the customer id to the order and welcome emails. How do I do that. I want to use the ID as an account number for each customer. Link to comment Share on other sites More sharing options...
cactusman2 Posted August 23, 2010 Share Posted August 23, 2010 You can try to add {id} in the following files:mails/your-language/account.htmlmails/your-language/account.txtno guarantee :-) Link to comment Share on other sites More sharing options...
gofer_p Posted August 23, 2010 Author Share Posted August 23, 2010 Tried that but only{id} shows up in mail and not the actual customer id Link to comment Share on other sites More sharing options...
cactusman2 Posted August 23, 2010 Share Posted August 23, 2010 What about {id_customer}? Link to comment Share on other sites More sharing options...
gofer_p Posted August 24, 2010 Author Share Posted August 24, 2010 That did not work either.Still shows {id_customer} in email. Link to comment Share on other sites More sharing options...
rocky Posted August 24, 2010 Share Posted August 24, 2010 That won't work since those variables aren't passed in the mail template. You must add them by changing line 111 of authentication.php )in PrestaShop v1.3.1) from: if (!Mail::Send(intval($cookie->id_lang), 'account', 'Welcome!', array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname)) to: if (!Mail::Send(intval($cookie->id_lang), 'account', 'Welcome!', array('{id_customer}' => $customer->id, '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname)) Then you can use {id_customer} in the account.html and account.txt mail templates.To do the same for the order_conf.html and order_conf.txt mail templates, you'll need to change lines 308-309 of classes/PaymentModules.php (in PrestaShop v1.3.1) from: $data = array( '{firstname}' => $customer->firstname, to: $data = array( '{id_customer}' => $customer->id, '{firstname}' => $customer->firstname, Link to comment Share on other sites More sharing options...
gofer_p Posted August 24, 2010 Author Share Posted August 24, 2010 Thanks Rocky, that worked. You always have the answers.Thanks to you also cactusman2 for trying to help me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now