[Skip to main content](#vessel-content)

#   \[solved\] activation mail &amp; include user fields

##

- **[SG](/forum/user/12204-sg "View SG's Profile")**
- [![SG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12204-sg "View SG's Profile") Topic Author
- [ Offline](/forum/user/12204-sg)

Less More

- Posts: 101
- Thank you received: 12
-
-

13 years 6 months ago -  13 years 6 months ago [\#106169](#106169) by [SG](/forum/user/12204-sg "View SG's Profile")  *[\[solved\] activation mail &amp; include user fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106169 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")* was created by *[SG](/forum/user/12204-sg "View SG's Profile")*

Hi,

I'm able to include user and address fields in the email template for "User account" (see code below)
I'd like to show the same information in the mail that the admin gets with the subject of COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_SUBJECT.

This should be the text that shows the name, email and the username and the activation link to approve:
COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY

> Hello administrator,\\n\\nA new user has registered at %s.\\nThe user has verified his email, and requests that you approve his account.\\nThis email contains their details:\\n\\n Name : %s \\n email: %s \\n Username: %s \\n\\nYou can activate the user by clicking on the link below:\\n %s \\n

This way the person that gets this email can see all the info and decide whether or not to activate/approve it.

Thanks.

Here is an example of the code for "user account" email template in case someone wants to use it: Code:

&lt;?php echo JText::sprintf('YOU_CAN_LOG_IN_WITH');?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('HIKA_USERNAME').': '.$data-&gt;username;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('HIKA_PASSWORD').': '.$data-&gt;password;?&gt;&lt;br/&gt; &lt;br/&gt; &lt;?php echo JText::sprintf('HIKA_EMAIL').': '.$data-&gt;email;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('COMPANY').': '.$data-&gt;user_data-&gt;user_company_name;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('LINE_OF_BUSINESS').' : '.$data-&gt;user_data-&gt;user_line_of_business;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('VAT_N').': '.$data-&gt;user_data-&gt;user_vat_nr;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('TELEPHONE').': '.$data-&gt;user_data-&gt;user_work_tel;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('FAX').': '.$data-&gt;user_data-&gt;user_fax;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('MOBILE_N').': '.$data-&gt;user_data-&gt;user_mobile;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('LANGUAGE').': '.$data-&gt;user_data-&gt;user_language;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('ALREADY_CLIENT').': '.$data-&gt;user_data-&gt;user_already_customer;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('WISH_NEWSLETTER').': '.$data-&gt;user_data-&gt;user_wish_newsletter;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('OPENING_HOURS').': '.$data-&gt;user_data-&gt;user_opening_hours;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('CLOSING_DAYS').': '.$data-&gt;user_data-&gt;user_closing_days;?&gt;&lt;br/&gt; &lt;br /&gt; &lt;?php echo JText::sprintf('TITLE').': '.$data-&gt;address_data-&gt;address_title;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('FIRSTNAME').': '.$data-&gt;address_data-&gt;address_firstname;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('LASTNAME').': '.$data-&gt;address_data-&gt;address_lastname;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('STREET').': '.$data-&gt;address_data-&gt;address_street;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('BOX').': '.$data-&gt;address_data-&gt;address_box;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('POST_CODE').': '.$data-&gt;address_data-&gt;address_post_code;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('CITY').': '.$data-&gt;address_data-&gt;address_city;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('TELEPHONE').': '.$data-&gt;address_data-&gt;address_telephone;?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('COUNTRY').': '.$data-&gt;address_data-&gt;address_country;?&gt;&lt;br/&gt;&lt;br/&gt;

Last edit: 13 years 6 months ago by [SG](/forum/user/12204-sg "View SG's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86592
- Thank you received: 14334
-
-

13 years 6 months ago [\#106242](#106242) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106242 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

You can edit the "user account admin notification" email of Hikashop in a similar manner for that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[SG](/forum/user/12204-sg "View SG's Profile")**
- [![SG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12204-sg "View SG's Profile") Topic Author
- [ Offline](/forum/user/12204-sg)

Less More

- Posts: 101
- Thank you received: 12
-
-

13 years 6 months ago [\#106246](#106246) by [SG](/forum/user/12204-sg "View SG's Profile")  Replied by *[SG](/forum/user/12204-sg "View SG's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106246 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

Hi,

That would be great if it is possible like you suggest.
I just don't see this email template. I'm using hikashop 2.1.0 for the moment.
Is this the reason why it isn't there?

[ ![&#91;IMG](http://i39.tinypic.com/rj2qz9.jpg) ](http://i39.tinypic.com/rj2qz9.jpg "&#91;IMG")

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86592
- Thank you received: 14334
-
-

13 years 6 months ago [\#106249](#106249) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106249 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

It has been added only in newer versions of HikaShop.
So that's normal.
If you don't see it, it means that HikaShop is not sending any admin notification after HikaShop user registration so there is nothing to edit...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[SG](/forum/user/12204-sg "View SG's Profile")**
- [![SG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12204-sg "View SG's Profile") Topic Author
- [ Offline](/forum/user/12204-sg)

Less More

- Posts: 101
- Thank you received: 12
-
-

13 years 6 months ago -  13 years 6 months ago [\#106302](#106302) by [SG](/forum/user/12204-sg "View SG's Profile")  Replied by *[SG](/forum/user/12204-sg "View SG's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106302 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

Hi,

I installed the latest hikashop and now I see USER_ACCOUNT_ADMIN_NOTIFICATION in the email template.
1) for some reason it doesn't show the name 'User account admin notification" but USER_ACCOUNT_ADMIN_NOTIFICATION.

2) Inside this file I added one more field ($data-&gt;user_data-&gt;user_company_name) just to test with it:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.1.3 * @author hikashop.com * @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php echo JText::sprintf( 'HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION_BODY', $data-&gt;name, $data-&gt;username, $data-&gt;user_data-&gt;user_company_name, HIKASHOP_LIVE ); ?&gt;

And in COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY I just added **Company: %s**
Code:

Hello administrator,\n\nA new user has registered at %s.\nThe user has verified his email, and requests that you approve his account.\n This email contains their details:\n\n Name : %s \n Email: %s \n Username: %s \n Company: %s \n\nYou can activate the user by clicking on the link below:\n %s \n

When I did these changes I get the following error when I click on the activation link: Code:

Warning: sprintf() [function.sprintf]: Too few arguments in /public_html/site/libraries/joomla/methods.php on line 320

When I remove the last %s it works but I really want to show the other field(s) so the admin has all the info about the user in the mail and approve straight away.

I'm probable missing something. Maybe there is another file that needs to be altered?

Thanks.

Last edit: 13 years 6 months ago by [SG](/forum/user/12204-sg "View SG's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86592
- Thank you received: 14334
-
-

13 years 6 months ago [\#106305](#106305) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106305 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

As you can see in the email code, it is that string that you need to change in the translation:
HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION_BODY

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[SG](/forum/user/12204-sg "View SG's Profile")**
- [![SG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12204-sg "View SG's Profile") Topic Author
- [ Offline](/forum/user/12204-sg)

Less More

- Posts: 101
- Thank you received: 12
-
-

13 years 6 months ago -  13 years 6 months ago [\#106316](#106316) by [SG](/forum/user/12204-sg "View SG's Profile")  Replied by *[SG](/forum/user/12204-sg "View SG's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106316 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

Hi Nicolas,

I'm probably confused cause I'm starting to think that I'm not working in the correct place.

Let me start over.

New user registers on the site. The user get's an email to activate it (subject: Account details for %s at %s)
When the user clicks on the link then a mail is send to the administrator to approve (Registration approval required for account of %s at %s)

It's this mail that the administrator receives that should contain the user and address fields.

This is the string:
COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY
So when I add for example the company name it becomes:
Code:

Hello administrator,\n\nA new user has registered at %s.\nThe user has verified his email, and requests that you approve his account.\n This email contains their details:\n\n Name : %s \n Email: %s \n Username: %s \n Company: %s \n\n You can activate the user by clicking on the link below:\n %s \n

So something is feeding this string and I first thought it was the email template USER_ACCOUNT_ADMIN_NOTIFICATION
But like you said in the last post it has string HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION_BODY
Code:

echo JText::sprintf( 'HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION_BODY', $data-&gt;name, $data-&gt;username, HIKASHOP_LIVE );

So I can only conclude that this is not the right place to add the field(s) since HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION_BODY is not USER_ACCOUNT_ADMIN_NOTIFICATION. I'm looking for the place where COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY is send with the parameters.

After the upgrade from 2.1.0 to 2.1.3 these are the email templates that I see: (only one is added: USER_ACCOUNT_ADMIN_NOTIFICATION)
[ ![&#91;IMG](http://i42.tinypic.com/2qdbr7a.jpg) ](http://i42.tinypic.com/2qdbr7a.jpg "&#91;IMG")

**Thanks for your patience.**

Last edit: 13 years 6 months ago by [SG](/forum/user/12204-sg "View SG's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86592
- Thank you received: 14334
-
-

13 years 6 months ago [\#106344](#106344) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106344 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

The user account admin activation email is not handled by HikaShop but by joomla. I would recommend to ask that on forum.joomla.org
They should be able to help you on that better than us on how to properly modify it.
If you search through the joomla code, you will find that COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY is in the file components/com_users/models/registration.php so I encourage you to look there.
Unfortunately, you won't be able to easily get the user information in that email as it is not a HikaShop email and thus the data of the user added by HikaShop won't be there either. You would have to load it yourself with MySQL queries to the database before being able to add it to the email text.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[SG](/forum/user/12204-sg "View SG's Profile")**
- [![SG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12204-sg "View SG's Profile") Topic Author
- [ Offline](/forum/user/12204-sg)

Less More

- Posts: 101
- Thank you received: 12
-
-

13 years 6 months ago [\#106492](#106492) by [SG](/forum/user/12204-sg "View SG's Profile")  Replied by *[SG](/forum/user/12204-sg "View SG's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106492 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

Hi,

I did what you suggested and I altered registration.php and I've used the following code;
Code:

$db-&gt;setQuery( 'SELECT * FROM '.$db-&gt;quoteName('#__hikashop_user').' as a JOIN '.$db-&gt;quoteName('#__hikashop_address').' as b ' .'WHERE a.user_id = b.address_user_id AND '.$db-&gt;quoteName('user_cms_id').' = '.$userId ); $userInfo = $db-&gt;loadObject();

And
Code:

$emailBody = JText::sprintf( 'COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY', $data['sitename'], $data['name'], $data['email'], $data['username'], $userInfo-&gt;user_company_name, $userInfo-&gt;user_line_of_business, $userInfo-&gt;user_vat_nr, $userInfo-&gt;user_work_tel, $userInfo-&gt;user_fax, $userInfo-&gt;user_mobile, $userInfo-&gt;user_language, $userInfo-&gt;user_already_customer, $userInfo-&gt;user_wish_newsletter, $userInfo-&gt;user_opening_hours, $userInfo-&gt;user_closing_days, $userInfo-&gt;address_title, $userInfo-&gt;address_firstname, $userInfo-&gt;address_lastname, $userInfo-&gt;address_street, $userInfo-&gt;address_box, $userInfo-&gt;address_post_code, $userInfo-&gt;address_city, $userInfo-&gt;address_telephone, $userInfo-&gt;address_country, $data['siteurl'].'index.php?option=com_users&amp;task=registration.activate&amp;token='.$data['activation'] );

It seems to work.
If you have any suggestion then please feel free to make correction/modification to the code above.

Too bad there wasn't an email template available to begin with.
If you guys are willing to put this on the todo-list that would be great and we won't need to hack the joomla files.
I know it's not a priority so even if it gets done later that would be better than nothing.

Thanks for pointing me in the right direction.

Greets

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86592
- Thank you received: 14334
-
-

13 years 6 months ago [\#106524](#106524) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[edit activation mail &amp; include user address fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106524 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

The problem is that this is an email of Joomla. We cannot provide a template for it as it is joomla which handles it.

I would recommend you to use a class override plugin as explained here [ my.safaribooksonline.com/book/web-develo...plugins/ch05lev1sec8](http://my.safaribooksonline.com/book/web-development/joomla/9780132780841/extending-joomla-with-plugins/ch05lev1sec8) in order to avoid modifying the joomla core file.

The following user(s) said Thank You: [SG](/forum/user/12204-sg "View SG's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[SG](/forum/user/12204-sg "View SG's Profile")**
- [![SG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12204-sg "View SG's Profile") Topic Author
- [ Offline](/forum/user/12204-sg)

Less More

- Posts: 101
- Thank you received: 12
-
-

13 years 6 months ago [\#106529](#106529) by [SG](/forum/user/12204-sg "View SG's Profile")  Replied by *[SG](/forum/user/12204-sg "View SG's Profile")* on topic *[\[solved\] activation mail &amp; include user fields](/forum/4-how-to/82845-solved-activation-mail-include-user-fields#106529 "Hi,  I'm able to include user and address fields in the email template for &quot;User account&quot; (see code below) I'd like to show the same information in the mail that the admin gets with the subject of COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;SUBJECT.  This should be the text that shows the name, email and the username and the activation link to approve: COM&#95;USERS&#95;EMAIL&#95;ACTIVATE&#95;WITH&#95;ADMIN&#95;ACTIVATION&#95;BODY  This way the person that gets this email can see all the info and decide whether or not to activate/approve it.  Thanks.  Here is an example of the code for &quot;user account&quot; email template in case someone wants to use it:")*

Hi Nicolas,

Thank you so much for the information. I will definitely take a look.
I really appreciate it!!!!!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyODQ1LXNvbHZlZC1hY3RpdmF0aW9uLW1haWwtaW5jbHVkZS11c2VyLWZpZWxkcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.078 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
