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) »
  • Discussion (deprecated) »
  • CiviCRM Showcase (Moderator: Michał Mach) »
  • Centre for Social Innovation CiviEvent project
Pages: [1]

Author Topic: Centre for Social Innovation CiviEvent project  (Read 7420 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Centre for Social Innovation CiviEvent project
June 02, 2008, 02:35:51 pm
Overview

In early 2008, the Centre for Social Innovation got Communicopia to relaunch their http://socialinnovation.ca website on a Drupal platform. Shortly after they wanted to start extending its functionality and asked JMA Consulting about creating some e-commerce pages to accept payments for event registrations. I suggested using CiviEvent instead. To reduce upgrade and integration costs, we set up a separate subdomain, https://events.socialinnovation.ca, which allowed us to host CiviCRM on a machine with a multi-site Drupal/CiviCRM install. We like to share the code base between different domains and have separate databases for each, in order to spread the cost of upgrades across more clients.

Out of the box vanilla CiviCRM didn't met the needs of the Centre for Social Innovation. They share with other users of CiviEvent a desire for some upcoming features, such as wanting multiple registrations per page, and waiting lists. But they also had some other requirements:
  • challenging layout demands for their initial events,
  • improvements in emailing Pay Later registrants, and
  • a desire for changes to the 'billing info' fields that were being collected.

Custom Templates

In their first event, they wanted different fieldsets to capture break-out session sign-ups, background information on relevant projects participants were already working on, and their contact information. We used profiles for each of the first two needs, and modified the display of the Billing Info section to handle the third. This involved overriding just for this site in our multi-site install the templates for the Register, Confirm and Thank you pages (in civicrm/templates/CRM/Event/Form/Registration), which was fairly straightforward using the instructions at http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in+and+Profile+Screens for built-in screens. We changed the name of the Billing Info fieldset to Participant Contact Information, and changed the processing logic in the tpl files so that the information was collected and displayed for Pay Later as well as Credit Card registrants. (Email me if you'd like the tpl files.)

Pay Later Emails

There was an issue with the Pay Later option not sending the Confirmation email until, well, participants had paid later and were confirmed participants. To ensure that Pay Later registrants received an email immediately after signing up on the website with instructions on where to send their cheque and the deadline for it being received, we modified /civicrm/CRM/Event/Form/Registration/ThankYou.php. A more elegant design would have involved extending the database design and admin forms to allow these emails details to be administered by end users. However, the client had limited funds so we just added the following code (see attached ThankYou.php.patch for slightly longer version supporting customized emails for several events).
Code: [Select]
        if ( $this->_params['is_pay_later'] ) {
            switch ( $this->_id) {
case 5:
    //process sending of mails
            $email = $this->_params['email-5'];
            $title       = 'Thank you for your Sharing for Social Change Registration';       
            $msg     = "Thank you for registering. Your spot has been tentatively reserved on the condition that your payment is received by the Centre for Social Innovation by May 30, 2008. Please remember that you will lose your spot if payment is not received by that date.

If you have any questions regarding the event or your registration, please email our event coordinator David Furlong, Social Energy, david@socialenergy.ca.
Please print this confirmation for your records.

===========================================================
Event Information and Location
===========================================================
Sharing for Social Change
June 18th, 2008  7:30 AM-05:00 PM

101 College Street
Toronto M5G 1L7
Download iCalendar File: https://events.socialinnovation.ca/civicrm/event/ical?reset=1&id=5
";
            $from = "From: sharing@socialinnovation.ca";
            $retval = mail( $email, $title, $msg, $from );
    break;
            // insert switch code for other events here
            }
        }

As an aside, during debugging we found it convenient to comment out the following line (around 126 or so) in ThankYou.php:
Code: [Select]
$this->controller->reset( );

Additional Field for 'Billing Info'
The Centre for Social Innovation also wanted to add Organization Name to the Billing Information fields, since it didn't make sense putting that in the fieldsets for registrant's session choices or projects. At first I thought this would be difficult since it would require creating another CiviCRM contact object for the Organization. But by the time the client had gotten around to putting up second set of three similar events (with a similiar need for two profile fieldsets for non-contact info fields), I'd realized that changes in CiviCRM's database design from 1.7 to 2.0 (http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+ERD+2.0) meant it's now much simpler since there is an organization_name field in the civicrm_contact table.

The attached Register.php.patch file shows how we modified the CiviCRM business layer in /civicrm/CRM/Event/Form/Registration/Register.php to require users to provide an Organization name. Note that it's important not to do this without also adding the field to the matching presentation level tpl file, or users will be required to enter a field that is not present in their form. Here's the code we needed to insert in our custom template for CRM/Event/Form/Registration/Register.tpl to add the field for events 8, 12, and 13:
Code: [Select]
{if $event.id == 8 || $event.id == 12 || $event.id == 13}
          <tr><td class="label">Organization Name <span class="marker"  title="{ts}This field is required.{/ts}">*</span></td><td>{$form.organization_name.html}</td></tr>
{/if}

For some reason I've yet to determine, similar modifications to add the job_title field didn't work - I hope to work on that soon.

Other Requirements
The client was concerned that they needed a waiting list for their events since they were allowing a pay later option, and they wanted to be able to ensure a balanced group were attending the event. Their ideal implementation would be along the lines of http://wiki.civicrm.org/confluence/display/CRM/CiviEvent+-+Feature+Candidates?focusedCommentId=7733502#comment-7733502,. We ended up including an invitation to join the waiting list via a link in the text displayed when an event is full. This link went to a CiviCRM Profile signup that added people to a Waiting List Group. Selected inviduals in this group were then sent emails including inviting them to attend 'the event' by clicking on a url that went to a copy of the original event that was not yet full.

The client also found moving around the CiviEvent management interface a bit non-intuitive, so we expanded the descriptions of a couple of interface options. We also found that the Pay Later option got turned off regularly (it seems not to have its current value set when the event fees page is loaded), and we'll be working to exactly diagnose and provide a issue and perhaps a patch for that shortly.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

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: Centre for Social Innovation CiviEvent project
June 02, 2008, 02:45:22 pm

joe:

thanx for the writeup. not sure what version of civicrm you are using, but the pay later bug has been resolved in 2.0 (http://issues.civicrm.org/jira/browse/CRM-3025). This was fixed in 2.0.3

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

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: Centre for Social Innovation CiviEvent project
June 03, 2008, 03:40:20 am
Thx lobo - we're at 2.0.2, so we'll upgrade.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • CiviCRM Showcase (Moderator: Michał Mach) »
  • Centre for Social Innovation CiviEvent project

This forum was archived on 2017-11-26.