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) »
  • General Discussion (please no support requests here!) (Moderator: Michał Mach) »
  • CiviEvent: How to generate invoices and course certificats (as PDF)
Pages: [1]

Author Topic: CiviEvent: How to generate invoices and course certificats (as PDF)  (Read 748 times)

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
CiviEvent: How to generate invoices and course certificats (as PDF)
June 23, 2015, 03:19:01 am
Hello all,

I use CiviCRM as a registration system for courses I give. People register online, but the rest of the communication goes by paper. I currently export the data from CiviCRM to create all the other documents in Libreoffice, but I'm wondering what would be the best way to integrate this into CiviCRM.

Currently I use the following templates:
  • Registration confirmation to the participant + invoice (before the course)
  • List of attendees with contact details also for the teacher
  • Course certificate
  • Cover letter for course certificate

How can I create / adapt these templates in CiviCRM (or Drupal?)? Should I explore CiviCase for this?

Thanks for the help.

Simon
« Last Edit: June 24, 2015, 06:44:04 am by Simon147 »

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Creating course documents and list of attendees
June 23, 2015, 04:49:18 am
I'm partly answering myself here. I presume that CiviCase might be something to add to control that all the things related to a course have been done.

However, if I  understand it right, I have to start working with message templates, either system workflow messages or user driven messages, and only then - maybe - create cases if this is really needed.

But I'm a bit lost in the code there and not sure where to start, for example, to generate a document that first lists the course participants and then the course teacher. Any advice on where to start with this?

Simon 

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: CiviEvent: How to generate invoices and course certificats (as PDF)
June 26, 2015, 12:18:13 pm
Hi Simon,

There can be many ways of implementing this, but a few things come to mind:

- If you are managing course of groups with many participants, and the workflow is basically: register for course, get a certificate, I would go with CiviEvent. This way it's easy to generate a list of participants, see their status in the course (I suppose some might not complete the course?). Then you can use Activities to send a PDF letter to all participants. You can customize PDF letters to use tokens (name of the participant) and html (to add logos, make it look more official).

- If the course has a series of steps, and each participant has a workflow they need to follow, and needs to be controlled, CiviCase might be more appropriate. However, then you kind of lose the tracking as a group (unless you tag or otherwise identify the individual cases).

You could also combine: participant registers for a course, each participant gets a case to track their progress in the course. A "hook" (custom extension) could automate the creation of the case. The challenge of course might be to have an interface that will be intuitive for the staff, have good dashboards.

You might want to try asking on CiviCRM's Stack Exchange: http://civicrm.stackexchange.com/

I think this falls under the category of "support", since you have a specific question, people might want to ask questions to clarify the requirement, and people can vote on what's the best solution. If you post there let me know, I'll post my answer, and people can vote on it ;)

Mathieu
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: CiviEvent: How to generate invoices and course certificats (as PDF)
June 26, 2015, 12:36:20 pm
Thanks Mathieu. I'm already today using CiviEvent for these courses.

The question is really mostly about the templates. I'm unable to generate them with the normal tokens. To give you an idea:
  • Course certificats: It's easy to integrate the name and birth date of the person, but to add the right course title, content and date?
  • List of attendees: Same. In addition, it should contain first the list of the attendees followed by the name(s) of the teacher(s).

I guess this can be done with hooks, right. But do I need to develop a specific extension, or can this be done somehow through the templates?

Simon


Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: CiviEvent: How to generate invoices and course certificats (as PDF)
June 26, 2015, 12:40:28 pm
PS: Is your goal to generally move conversations over to stackexchange? If yes, I can indeed ask the question there again.

mathieu

  • Administrator
  • Ask me questions
  • *****
  • Posts: 620
  • Karma: 36
    • Work
  • CiviCRM version: 4.7
  • CMS version: Drupal
  • MySQL version: MariaDB 10
  • PHP version: 7
Re: CiviEvent: How to generate invoices and course certificats (as PDF)
June 26, 2015, 12:45:19 pm
Hi Simon,

If it's not possible with the tokens, you could use the API with Smarty in the template itself. It can be a bit messy (in terms of readable code), but it's the faster way to test.

If you're not familiar with the API, there are docs in the wiki: https://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API

I usually create a custom token to avoid having to put complicated code in templates. If you're comfortable with coding, it's basically to install "civix", generate a custom extension (if you don't already have one), and implement the token hooks.

Mathieu

PS: In general, yes, the aim is to move support questions to Stack Exchange. This forum is still here for general discussions on topics that can't really move to Stack Exchange, i.e. brainstorming, non-English forums, general announcements that aren't within the blog's scope, etc. I don't mind answering this question here, but you may get more replies on Stack Exchange.
CiviCamp Montréal, 29 septembre 2017 | Co-founder / consultant / turn-key CiviCRM hosting for Quebec/Canada @ SymbioTIC.coop

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • General Discussion (please no support requests here!) (Moderator: Michał Mach) »
  • CiviEvent: How to generate invoices and course certificats (as PDF)

This forum was archived on 2017-11-26.