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) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Tokens for membership data?
Pages: [1]

Author Topic: Tokens for membership data?  (Read 1064 times)

sjthespian

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 3
    • The League of Professional System Administrators
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Tokens for membership data?
February 28, 2011, 10:01:47 am
I made the mistake of sending out an e-mail to our expired members this past weekend using a token from our expiration notice:  {$memberParams.end_date|crmDate}.  This works fine in the expiration notices, but it looks like memberParams are not exposed to CiviMail.

What would it take to add these values to regular CiviMail messages?
Dan Rich <drich@lopsa.org>
    Director, LOPSA - http://lopsa.org/

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Tokens for membership data?
February 28, 2011, 01:13:42 pm
You would probably need to write a hook.

Normally the membership fields are exposed from code that is working with a specific membership object. When working from CiviMail it doesn't know what membership you are working with.
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

sjthespian

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 3
    • The League of Professional System Administrators
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Re: Tokens for membership data?
March 08, 2011, 04:15:52 pm
It should be possible to figure out what membership you want, i.e. "the membership with the latest expiration date", or to have a modification to the tokens to specify the membership (not exactly sure what that would look like off the top of my head).

Admittedly, I have already been bitten by the multiple membership problem. We wanted to send an e-mail to all of our members with expired membership and got a surprise when we were getting responses from people who had valid memberships.  It turns out that if you create a smart group of "all members with expired memberships" you also get members with valid memberships if they have an old membership that is expired (in our case, from things like student memberships that were renewed as full memberships). Off hand, I haven't come up with a search yet that will get around that one....
Dan Rich <drich@lopsa.org>
    Director, LOPSA - http://lopsa.org/

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: Tokens for membership data?
March 09, 2011, 02:41:01 am
how about setting the 'end date' to eg within the last year - so you should avoid people who had a separate membership 3 years ago?
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Tokens for membership data?

This forum was archived on 2017-11-26.