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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • UpdateMembershipRecord.php does not send renewal reminders
Pages: [1]

Author Topic: UpdateMembershipRecord.php does not send renewal reminders  (Read 1017 times)

boulderfuzz

  • I’m new here
  • *
  • Posts: 18
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19
  • MySQL version: unknown
  • PHP version: unknown
UpdateMembershipRecord.php does not send renewal reminders
April 06, 2011, 02:07:44 pm
The subject pretty much says it all - I have a cronjob running UpdateMembershipRecord.php on a daily basis.  Each day my log file indicates successful completion:
Updating ..................................................................................
 Membership records updated. (Done)

(this is the entirety of the script output, minus a bunch of "......").

However, surfing around the contact and membership records incidates renewal emails are not going out.  Online reading indicates an activity record should be created when renewal emails are sent.  Yet, if I browse membership records which should have received a reminder email on the specified schedule (30 days prior), these folks do not have an activity record indicating a renewal email was successfully sent.

I have a vague memory of a forum thread where someone had added output statements to indicate which records were changed, but cannot locate that thread.  So I'm at a loss on what output should come out of this script, and do not know how to debug the issue.

Any ideas on where to start?  I am a Civi end-user and do not understand PHP, so I would appreciate some hand-holding - what may be obvious to you is probably revelatory to me.  :)  Many thanks!

The only change I have made to UpdateMembershipRecord.php is the $fromEmailAddress, as I was told to do in the script header.  Everything else was left as-is (CiviCRM 3.3).

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: UpdateMembershipRecord.php does not send renewal reminders
April 07, 2011, 09:36:56 am
First thing is to verify that Renewal Reminder Dates have been set for your memberships. You can pick a current membership from the Membership Dashboard and "View" it. You should see a Reminder Date near the bottom of that screen.

Some tips on Automated reminders:
1. Each membership type has to have a Renewal Reminder Template selected and a value for Renewal Reminder Days (days prior to membership end date to send the reminders).  (Administer > CiviMember > Membership Types)

2. Step one needs to happen prior to a membership being created or renewed (the Renewal Reminder date is set at that time).

3. Currently renewal reminders are only sent one time and then the renewal reminder date is cleared (so it will be empty if a reminder has already been sent).

If all the above looks good, then you may need to add some "debug statements" to the script - ideally you can recruit someone w/ a bit of PHP knowledge to help w/ that.

HTH

Protect your investment in CiviCRM by  becoming a Member!

boulderfuzz

  • I’m new here
  • *
  • Posts: 18
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19
  • MySQL version: unknown
  • PHP version: unknown
Re: UpdateMembershipRecord.php does not send renewal reminders
April 08, 2011, 08:11:11 am
Dave, thank you so much for identifying the issue at hand - indeed our membership database was populated with records *before* the Renewal Reminders were configured, thus the vast majority of memberships do not have a Reminder Date.  For memberships created or renewed since I set up the Renewal Reminders, indeed a Reminder Date is present for those records.

Is there a way to mass update membership records in a certain End Date range (probably the year previous to enabling Renewal Reminders) and set corresponding renewal reminder dates?   It would be really difficult for our organization to have to wait a full year for people to renew/sign up so that Civi can set Reminder Dates.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: UpdateMembershipRecord.php does not send renewal reminders
April 08, 2011, 02:49:57 pm
I think easiest approach would be to send the renewal reminders from within CiviCRM for those folks. Something like this:

Go to Find Members, select End Date range (and maybe membership status).
Select members needing reminder from results and use "Send Email to Contacts" to send out a reminder (you can save the reminder as a message template and reuse as needed). Not sure if you can use the one you have created for the automated reminders - but I think you can. Just make sure that any tokens you've used are populated when u send it this way (do a test).

NOTE: If you have > 50 to send, you'll need to batch them unless you've got CiviMail enabeld. If you have CiviMail you can do the search Advanced Search and select Schedule / Send Mass Mailing.

Alternative would be to update the DB directly using SQL statements. You could run a query which sets reminder_date for rows in civicrm_membership with end_date in a specific range and with reminder_date null. Assuming you use rolling membership dates - your query would include some SQL calculation to set reminder_date = end_date - $n days.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • UpdateMembershipRecord.php does not send renewal reminders

This forum was archived on 2017-11-26.