Results 1 to 3 of 3

Thread: Insert variable in email template

  1. #1
    joenineo is offline Sugar Community Member
    Join Date
    Aug 2009
    Posts
    41

    Default Insert variable in email template

    Hi

    I have created a cusom module and would like to set up an email template where I can pull in info from it. I can see there is Account, Contact/Lead/Target, Users in the drop down Insert Variable, my question is how do I add my custom module to this so that I can use the fields in it.

    Any pointers would be appreciated as I can't see anywhere that I can do this.
    Last edited by joenineo; 2010-02-02 at 01:05 PM.
    Link Connect
    web : www.link-connect.com

    Providing bonded adsl and pwan solutions in the uk

  2. #2
    Ezhilnilavan is offline Member
    Join Date
    Aug 2007
    Location
    Chennai
    Posts
    6

    Thumbs up Re: Insert variable in email template

    Got Solution.It works:

    Go to EmailTemplates.php

    Step1::
    ===========
    Modified your module here

    $loopControl = array(
    'Contacts' => array(
    'Contacts' => $contact,
    'Leads' => $lead,
    'Prospects' => $prospect,
    ),
    'Accounts' => array(
    'Accounts' => $account,
    ),
    'Users' => array(
    'Users' => $current_user,
    ),
    );

    $prefixes = array(
    'Contacts' => 'contact_',
    'Accounts' => 'account_',
    'Users' => 'contact_user_',
    );


    Step 2::
    ===========
    Go to /EmailTemapltes/EditView.php

    modify the drop down list.

    $dropdown="<option value='Accounts'>
    ".$mod_strings['LBL_ACCOUNT']."
    </option>
    <option value='Contacts'>
    ".$mod_strings['LBL_CONTACT_AND_OTHERS']."
    </option>
    <option value='wsi_m_ic_info'>
    ".$mod_strings['LBL_IC_INFO']."
    </option>
    <option value='Users'>
    ".$mod_strings['LBL_USERS']."
    </option>";

    Cheers,
    Ezhil Nilavan N

  3. #3
    pixprotom is offline Sugar Community Member
    Join Date
    Nov 2009
    Posts
    36

    Default Re: Insert variable in email template

    What about if the template is used in a campaign. Why is Accounts removed from the dropdown when it is in a campaign?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 2010-08-26, 04:51 PM
  2. Replies: 0
    Last Post: 2009-06-23, 02:37 PM
  3. Email Template Insert Variable Issue
    By dc50093 in forum Help
    Replies: 2
    Last Post: 2009-06-18, 05:19 AM
  4. Insert variable in email template!
    By gosugar in forum Help
    Replies: 0
    Last Post: 2006-04-14, 02:08 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •