CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Include Membership Tokens with Contact data in emails and PDF letters
Pages: [1]

Author Topic: Include Membership Tokens with Contact data in emails and PDF letters  (Read 3834 times)

davidunwinubs13

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 1
    • Marylebone Association
  • CiviCRM version: 3.3.6
  • CMS version: Drupal 6
  • MySQL version: 5
  • PHP version: 5
Include Membership Tokens with Contact data in emails and PDF letters
September 22, 2010, 12:37:43 am
If you do an advanced search on contacts you can search based on membership tokens. So for instance you can search for member's whose membership has expired. However, in the current version of CiviCRM 3.2.3 you cannot include this membership information when creating a PDF letter . So if you want to send an pdf letter to say all member's whose membership has expired, you can't include details about their membership in the email or pdf letter.

In a member search  you can search based on membership tokens, but you can't include in the Send email function the membership tokens! If you export the data however, the membership information fields are available.

From a membership administration point of view, having the membership information and contact information together seems to be something that most membership administrators would require.

Does anyone else think this feature would be useful and would anyone be interested in sharing the cost of developing this feature?

Kind regards

David

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Include Membership Tokens with Contact data in emails and PDF letters
November 10, 2010, 05:40:15 pm
Hi David- did you get anywhere with this. It has just come up again for us with a client. We have already done this sort of work for Contribution and Pledge tokens.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Include Membership Tokens with Contact data in emails and PDF letters
November 10, 2010, 06:11:34 pm

hey peter:

can u contribute your contribute and pledge token code

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Include Membership Tokens with Contact data in emails and PDF letters
November 10, 2010, 06:17:30 pm
sure - eileen will stop being grumpy and will blog - would be great if it can encourage similar for memberships - or if someone can subsidise us to do same.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Include Membership Tokens with Contact data in emails and PDF letters
November 10, 2010, 10:23:39 pm
Phew - I thought Pete had committed me to do something but it seems I don't have to do it until I stop being grumpy - which won't be until after the kids leave home! That's a bit of breathing space
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

puremetal

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3.6
  • CMS version: Joomla 1.5.23
  • MySQL version: 5.1.36
  • PHP version: 5.2.0
Re: Include Membership Tokens with Contact data in emails and PDF letters
April 11, 2011, 09:57:49 am
Has this gotten anywhere? I really need to be able to insert membership information (such as expiry date, which membership type the contact is subscribed to, and amount due) into emails and letters. CiviCRM is spot on for pretty much everything else I need to do except this one crucial area!

I might be able to scrape together something to fund some development on this, if anyone is willing. Otherwise I could have a go myself if anyone would be kind enough to point me in the right direction :P

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Include Membership Tokens with Contact data in emails and PDF letters
July 25, 2011, 04:32:33 pm
No traction on this?  I also have a client interested in printing "Expiration date" in all their outgoing reminder emails for membership renewals.   It's not a huge request, but it would be handy.   I imagine it is difficult because a single contact could potentially have multiple membership, and we'd have to make sure the expiration date was for the correct membership.

Try CiviTeacher: the online video tutorial CiviCRM learning library.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Include Membership Tokens with Contact data in emails and PDF letters
July 25, 2011, 04:57:04 pm
My code got outdated by api changes - I did start of converting my module to work on the basis that you could add extra tokens as 'plugins' but I can't remember whether that works or not at the moment. I think the code below was how the plugins were going to look

https://svn.fuzion.co.nz/repos/mprc/drupal/custom/civitoken


Code: [Select]
<?php 


function civitoken_declare_contribution_details(&$tokens){
  return 
array_merge($tokens, array (  'civitoken.contributionLast','civitoken.contributionList'));
}


function 
civitoken_get_contribution_details($cid, &$value){

    
$params['sort']       = 'receive_date DESC';
    
$params['contact_id'] = $cid;
    
$params['limit'] = 5;
    
$params['version'] =3;
    
$contributions = civicrm_api('Contribution','Get',$params);
    
//get field labels

    
$i = 0;
    
$value['civitoken.contributionList'] = "<table><tr><th>Amount</th><th>Date</th><th>Status</th><th>Type</th><th>Worker</th><th>Promo</th><th>Dept</th><th>Staff member</th></tr>";

    foreach(
$contributions as $contribution){
    if (
$i<5){
      
$value['civitoken.contributionList'] .= "<tr><td>$" . $contribution['total_amount'] . "</td>";
      
$value['civitoken.contributionList'] .= "<td>" . CRM_Utils_Date::customFormat($contribution['receive_date'], null,array('M','d','Y')) . "</td>";
      
$value['civitoken.contributionList'] .= "<td>" .$contribution['contribution_status_id']. "</td>";
      
$value['civitoken.contributionList'] .= "<td>" .$contribution['contribution_type']. "</td>";
      
$value['civitoken.contributionList'] .= "<td>" .$contribution['custom_50']. "</td>";
      
$value['civitoken.contributionList'] .= "<td>" .$contribution['custom_20']. "</td>";
      
$value['civitoken.contributionList'] .= "<td>" .$contribution['custom_21']. "</td></tr>";

    }
    
$i++;
    }
        
$value['civitoken.contributionList'] .= "</table>";

    return 
$value;

}
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Include Membership Tokens with Contact data in emails and PDF letters
July 25, 2011, 05:04:18 pm
Stuart - Quick look at bin/UpdateMembershipRecord.php makes me think the 'expiration date' (and other membership properties) MIGHT be available to a reminder message template as a smarty variable - {$memberParms.end_date}

I would try enabling debug on a test site and then putting the {debug} tag into the message template you've configured for reminders and run the script (if you turn on mail logging - then u'll get the output email as a file under ConfigAndLog folder - which is also helpful).

define( 'CIVICRM_MAIL_LOG', 1 );
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Include Membership Tokens with Contact data in emails and PDF letters

This forum was archived on 2017-11-26.