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) »
  • Any Membership info available via tokens?
Pages: [1] 2

Author Topic: Any Membership info available via tokens?  (Read 5181 times)

nrackleff

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Any Membership info available via tokens?
January 20, 2010, 02:23:57 pm
I am trying to create a renewal reminder message template through Administer > Configure > Message Templates. I can create a template, but I do not see membership end date available in the tokens list.  I would like to include the membership end date in the email so I can tell members to renew before their membership expires on a specific date.  Is there a way to make that show up as a token?  I do see a few membership items such as member number, membership id, membership type and member since.

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: Any Membership info available via tokens?
January 20, 2010, 02:45:43 pm

if you do not see it as a token, it is probably not exposed. You might have to use the token hook to expose the end date token. Alternatively you can submit a patch (and file an issue) and get the core membership code to expose the join/start/end date tokens

ping us on irc if u need help getting started

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

nrackleff

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
Re: Any Membership info available via tokens?
January 20, 2010, 02:58:08 pm
Thanks for the speedy reply.  It looks like http://civicrm.org/node/480 will get me started.  I'll jump in IRC if I need any help.

mhm

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
Re: Any Membership info available via tokens?
February 04, 2010, 08:41:38 pm
Nrackleff, any progress on this that you wouldn't mind sharing?  We are going to need this functionality, and I'm feeling a little (okay, I admit, a lot!) overwhelmed, since I'm totally new to tokens/hooks.

Otherwise, from the brief mentioned at http://civicrm.org/node/480, it appears I essentially need to create a module to make this happen. Or are there instructions somewhere on creating a patch to expose the membership info as tokens?

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: Any Membership info available via tokens?
February 05, 2010, 06:54:25 am

check:

http://issues.civicrm.org/jira/browse/CRM-5746

this is now available in those templates as smarty tokens :)

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

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
Re: Any Membership info available via tokens?
March 12, 2010, 02:41:49 am
Is it also possible to include the 'Minimum Fee' as a token? Is doesn't appear so from the list?
We would like to have reminders that say something like ' Dear xx your membership will expire on datexx, please send us a cheque for {minimum fee} made payable to xxx.

Thanks

David

nae

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
    • Play Australia
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 7.31
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Any Membership info available via tokens?
May 11, 2010, 04:00:38 am
I have not had any success inserting a token for end_date as shown at this link by lobo:

http://issues.civicrm.org/jira/browse/CRM-5746

I noticed in the updateMembershipRecord file that it is memParams not memberParams, but making this change did not make the value appear.

Is there something else I am missing here?

With thanks,
Renaee.

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: Any Membership info available via tokens?
May 11, 2010, 07:36:04 am

note that these are smarty tokens not civicrm tokens

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

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Any Membership info available via tokens?
May 11, 2010, 07:37:25 am
$memberParams as an array of membership record values should be available in message template that you are using for 'Reminder for Membership Renewal'.

membership end date value can be access like : {$memberParams.end_date}

hope this help

kiran
You Are Designed To Choose... Defined By Choice.

nae

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
    • Play Australia
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 7.31
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Any Membership info available via tokens?
May 12, 2010, 12:51:56 am
{$memberParams.end_date} this token does not bring up anything at all in my membership renewal template, just prints the token and not the value.

Is there anything else that needs to be added to the updateMembershipRecord.php to make this work?

ALso, I noticed the first person who posted said they could see/had available some other membership tokens to use, such as member id, membership type in the membership renewal template.  I do not have access to these as tokens either.

There is nothing in the Admin guide or documentation about such features, is there anywhere else to learn about how to use them?

Thanks again,
Renaee.

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: Any Membership info available via tokens?
May 12, 2010, 09:42:30 am

check:

http://en.flossmanuals.net/CiviCRM/DevelopIntro

Would be great if you can track this down. Might help if you can see all the smarty variables exposed. Maybe debug it for 1 membership record at a time?

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

nae

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
    • Play Australia
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 7.31
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Any Membership info available via tokens?
May 13, 2010, 04:33:40 am
Lobo,
Apologies,  I am not really sure what is being asked of me to do here. I have turned on the debugging, and I have added the &smartyDebug=1 to the end of the URL when I have the membership renewal message template open or loaded in the browser. The pop up browser window does not have anything that refers to the membership type or ID, and neither the memberParams  either.

This is my first civiCRM install and the first time I have needed to do anything beyond screen customization and CSS, please forgive my ignorance. I now understand the template system of find and replace, similar to the drupal theming system.  So am I meant to be working on the membership renewal file as a .tpl file - as in copy and replace it so then I add in the smarty tokens here?  Or are these smarty tokens meant to work 'out of the box' and show up in the emails by just simply putting the smarty tokens into the body of the email message on screen?

thanks for ongoing support,
Renaee.

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: Any Membership info available via tokens?
May 13, 2010, 01:27:17 pm

hey renaee:

1. can u explain what you are trying to do (and the use case if useful)

2. what version are u using of civicrm. if less than 3.1.4 you should upgrade to 3.1.4

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

nae

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
    • Play Australia
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 7.31
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Any Membership info available via tokens?
May 13, 2010, 04:49:40 pm
Yes - I am trying to have the automated membership renewal notice (triggered by the cron job) to display the membership type my members have, the cost of this membership, and most importantly, the date their membership will expire. I understand that I can simply say, your membership will expire in 30 days time, but I would like to be able to give people a calender date upon which time they must make payment.

The version I am using is 3.0.2

Perhaps this version does not support the smarty tokens for membership values?

However I have a test version of the latest civicrm install, running with drupal on local server under Mamp set up, and I have tested it with this, and cannot insert the membership expiry date on this install either.

Thanks again,
Renaee.

nae

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
    • Play Australia
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 7.31
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Any Membership info available via tokens?
May 13, 2010, 05:19:35 pm
Lobo - sorry I should also have added this information:

I am not using an online contribution form for my member sign up.

My client did not want automatic in invoicing, the want to be able to pre-approve membership, then send the invoice manually from the contact screen.

I have still configured member types, and still wish to use the automatic renewal signup form. However I realised that all I needed was a profile form to serve as application sign up form, because no financial transaction was required initially.

just thought this info may help,
ta,
Renaee.


Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Any Membership info available via tokens?

This forum was archived on 2017-11-26.