By HMED on Wednesday, 05 July 2017
Posted in General
Replies 6
Likes 0
Views 278
Votes 0
Hello,

actually notification emails (friend request, new registration ..) contain members photo with their names and friends count,
in some social network (linkedin for example) email contain jobs, location of people and its really helpfull to have an idea about people without clicking on their profil. Its more attractive and people are curious when they see thats this person do that job or he is in that city or country.

So,
is it possible to add a custom field value (job, location, ..) just under the member name ?
Unfortunately that was not possible to show user custom field data in the email notification at this point of time.

Perhaps you can request for a quote from us at https://crm.stackideas.com and select "Customisation" . Our sales person would be glad to send you a quote for the customisation that you have requested.
·
Wednesday, 05 July 2017 22:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Arlex !

Can you just tell me what i should add as variable or function in the email template ?
much appreciated !
·
Wednesday, 05 July 2017 23:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Actually you need to modify a few files in order to achieve this, perhaps you can try following and see how it goes but do note our support scope is not cover customisation.

Friend request :
JoomlaFolder/administrator/components/com_easysocial/includes/friends/friends.php request method
It did pass in the request user id variable requesterId

So you can use this requesterId variable in this email template file -> JoomlaFolder/components/com_easysocial/themes/wireframe/emails/friends/request.php

For example :

// current user object
$user = ES::user($requesterId);
// get the address custom field data belong to this user id
// this 'ADDRESS' is your address custom field unique key , you can get it from backend > Easysocial > profile type > custom field > edit that address custom field > copy that unique key
// When you print out this $customField, you will get this address data
$customField = $user->getFieldValue('ADDRESS');



New registration :
JoomlaFolder/administrator/components/com_easysocial/models/registration.php notifyAdmins method
But this one by default it didn't pass in the user id, so you have to manually add this variable in this method, you can check my screenshot here : http://take.ms/Bl4bw

Once you got this variable, you can use this variable userId in this following email template file

JoomlaFolder/components/com_easysocial/themes/wireframe/emails/registration/moderator.approvals.php
JoomlaFolder/components/com_easysocial/themes/wireframe/emails/registration/moderator.login.php
JoomlaFolder/components/com_easysocial/themes/wireframe/emails/registration/moderator.verify.php
JoomlaFolder/components/com_easysocial/themes/wireframe/emails/registration/moderator.auto.php


For example :

// current user object
$user = ES::user($userid);
// get the address custom field data belong to this user id
// this 'ADDRESS' is your address custom field unique key , you can get it from backend > Easysocial > profile type > custom field > edit that address custom field > copy that unique key
// When you print out this $customField, you will get this address data
$customField = $user->getFieldValue('ADDRESS');


Hope this will help.
·
Thursday, 06 July 2017 10:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks a lot, i tryed many hours but didnt find which codes to replace/add .. frustrated
i understand its not supported.

have a nice day.
·
Thursday, 06 July 2017 17:32
·
0 Likes
·
0 Votes
·
0 Comments
·
·
Thursday, 06 July 2017 17:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for understand.
·
Thursday, 06 July 2017 19:02
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post