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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • adding options for multiple renewal email reminders
Pages: [1]

Author Topic: adding options for multiple renewal email reminders  (Read 1674 times)

chrism

  • Guest
adding options for multiple renewal email reminders
April 28, 2008, 11:05:22 am
A strong request I received from staff who handle membership renewals is to enable more than one automated reminder.  Sending renewals before expiry, on the expiry, and at grace period expiry (or n days after expiry) is what they attempt to do manually.

A hack was discussed here http://forum.civicrm.org/index.php/topic,1506.msg6523.html#msg6523 but I'm wondering if there would be a good approach for developing this into the user interface and database.  Adding two extra fields to the form would be fairly straight forward, so I guess the most important question is how/where to store the settings in the DB. 

Any suggestions on an approach to customize the DB that wouldn't result in headaches when subsequently upgrading?  If this was of general interest, suggestions for the best DB schema change that could be migrated into core could be useful as well.

Thanks

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: adding options for multiple renewal email reminders
April 28, 2008, 12:31:30 pm

thinking aloud:

a. for each membership type, you will need a list of offsets from expiry as to when a reminder needs to be sent. This could probably be done as a join table (membership_type_id, offset). Might make sense for us to create a generic table structure for something like this, since it has come up before (entity_table, entity_id, data). I assume folks will probably want to tweak the reminder a wee bit depending on the offset

b. You will then need to modify UpdateMembershipRecord.php.txt to enforce the above rules. I suspect this will be the harder part of the solution

The above change introduces a new table (potentially generic), but does not really change core fields, so should be easier from an upgrade perspective. Would definitely be a good addition

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

chrism

  • Guest
Re: adding options for multiple renewal email reminders
April 30, 2008, 06:03:43 am
thanks for the suggestion.

a join table sounds like a good idea. i could see these fields:
- id
- membership_type_id,   
- renewal_msg_id, 
- renewal_reminder_day, 

where renewal_reminder_day would be the offset in days (either positive or negative from expiry date) at which to send the message template specified by renewal_msg_id

could you clarify your thought on generalization? i'm not clear on the "entity_table, entity_id, data" pattern

« Last Edit: April 30, 2008, 02:48:06 pm by chrism »

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: adding options for multiple renewal email reminders
April 30, 2008, 12:43:57 pm

Ignore the generalization ideas, does not apply in this case, IMO.

The table as you describe makes sense and should do the needful

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • adding options for multiple renewal email reminders

This forum was archived on 2017-11-26.