I can't seem to find the template for the automated emails that are sent on notification. Can someone point me to the right place, or file?
Thanks,,
I can't seem to find the template for the automated emails that are sent on notification. Can someone point me to the right place, or file?
Thanks,,
The template is in include/language/en_us.notify_template.html
Thanks for pointing to the file.
My question is now this:
I can see the code for each alert in the file and can tell that certain dynamic information is being pulled in from the database. My problem is that the variables are obviously not the field names as they exist in the database and after literally hours of searching I cannot see where they are defined. The vardef files are not useful as they do not follow that naming either.
I need to add two extra pieces of information to the lead assignment template, pulling each one from a custom field.
How do I find what to call these?
Thanks!
I was looking to do the same thing and found the answer at this post
http://www.sugarcrm.com/forums/showt...fication+email
Following on from that last post - I'm not much good with php and I can work out how to pull text fields into the email notification template, but I can't work out how to:
1. Show the Campaign associated with the lead
2. Show items from dropdown fields
Here's the code I'm using at the moment in leads.php which doesn't work. The field "interest_c" is the drop-down field.
Any help with the syntax I should be using here would be very much appreciatedfunction set_notification_body($xtpl, $lead)
{
global $app_list_strings;
global $locale;
$xtpl->assign("LEAD_NAME", $locale->getLocaleFormattedName($lead->first_name, $lead->last_name, $lead->salutation));
$xtpl->assign("LEAD_SOURCE", (isset($lead->lead_source) ? $app_list_strings['lead_source_dom'][$lead->lead_source] : ""));
$xtpl->assign("LEAD_STATUS", (isset($lead->status)? $app_list_strings['lead_status_dom'][$lead->status]:""));
$xtpl->assign("LEAD_DESCRIPTION", $lead->description);
$xtpl->assign("CAMPAIGN", $lead->campaign);
$xtpl->assign("PHONE_WORK", $lead->phone_work);
$xtpl->assign("EMAIL1", $lead->email1);
$xtpl->assign("INTEREST_C", (isset($lead->interest_c)? $app_list_strings['interest_c'][$lead->interest_c]:""));
Thanks
Marcus
I can see the problem but not being a php developer I'm not sure how to fix it.
In the variable declarations at the top of the page the table is set to "leads". The field you are trying to add (and the fields I'm trying to add) are in the leads_cstm table. So, not only would you need to code that table in I'm guessing you'd need to spell out the relationship to the leads table so that you're pulling back the correct information.
...seems like this should be a little bit easier
I have also posted the issue in the feature requests forum, requesting that they make this editable from within the application.
Could someone please provide some more details on how to do this?
I finally found all the files and code where the changes need to be made, but i don't know exactly what to do. (not a coder).
include/language/en_us.notify_template.html
modules/cases/case.phpCode:<!-- BEGIN: Case --> {ASSIGNER} has assigned a Case to {ASSIGNED_USER}. Account: {account_name} <---I want to have the account name listed here (currently shows up blank) Subject: {CASE_SUBJECT} Priority: {CASE_PRIORITY} Status: {CASE_STATUS} Description: {CASE_DESCRIPTION} You may review this Case at: <{URL}> <!-- END: Case -->
What exactly would i need to add here?????Code:function set_notification_body($xtpl, $case) { global $app_list_strings; $xtpl->assign("CASE_SUBJECT", $case->name); $xtpl->assign("CASE_PRIORITY", (isset($case->priority) ? $app_list_strings['case_priority_dom'][$case->priority]:"")); $xtpl->assign("CASE_STATUS", (isset($case->status) ? $app_list_strings['case_status_dom'][$case->status]:"")); $xtpl->assign("CASE_DESCRIPTION", $case->description); return $xtpl;
Also, if a change is made here, is it upgrade safe? or would another file need to be created in custom/modules/cases?
does anything need to be changed or updated in include/language/en_us.lang.php???
Thanks,
Darren
Last edited by teldarren; 2009-03-18 at 09:27 PM. Reason: adding more info per request of a forum member
Hi add this code
$xtpl->assign("ACCOUNT_NAME", $account->name); in case.php
and add this code
Account: {ACCOUNT_NAME}
I m not much aware of account module so u have to do r&d on it but it is the way to do template in mail function .Hope this helps
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks