personal pdf for group registrants

  • zesharck
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 2 months ago #73668 by zesharck
personal pdf for group registrants was created by zesharck
Hi all

I would like to know how you do to have a specific pdf ofr each person registrated from a group. actually each member of this group receive the same PDF with the name of the person who had done (paid) the registration group.
It is impossible to see the name of each member of the group in the PDF.

So how to send a personnal PDF (with his name) to each member registrated ?

thx for your answers ;)

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #73721 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic personal pdf for group registrants
Hi

Unfortunately, the extension doesn't have this feature. We don't have a way to send PDF file to every members in a group registration

Tuan

Please Log in or Create an account to join the conversation.

  • zesharck
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 2 months ago #73787 by zesharck
Replied by zesharck on topic personal pdf for group registrants
Ok Tuan, thank you for your answer.

Is there an other way to have the name of the members of the group in the invoice ?

Maybe add all the members names in the invoice ? and then the creator (of the event) will control the names with their identity cards the day of the event?
Have you got an other idea?

thx

Cédric.

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #74287 by Brian Lisle
Replied by Brian Lisle on topic personal pdf for group registrants
I would also like the invoice to list the group members. Right now, all it shows is the 1 line item for the event and the total paid, but there seems to be no way to list who it was paid for.

Please Log in or Create an account to join the conversation.

  • zesharck
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 2 months ago #74492 by zesharck
Replied by zesharck on topic personal pdf for group registrants
Yes Brian,
that is a problem and I receive mails about that on every events I manage :unsure:

Just having the list of the persons of the group in the invoive will solved this problem for sure. :whistle:

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago - 8 years 2 months ago #75058 by JamiRae
Replied by JamiRae on topic personal pdf for group registrants
I created a simple way to add the names of group members to the invoice. It requires that you know some basic HTML and be able to FTP files to your site. here’s how I did it:

1) make a back up of your site or at least make a back up copy of this file:
{your site}/components/com_eventbooking/helper/helper.php

Now, store the original someplace safe, in case you make an error you can always go back to it. personally I simply name the copy ORIGhelper.php so I know it’s the original and usually leave it on the server with a backup on my machine.

2) create a new file (in your favorite text or PHP/HTML editor) called invoice_group_items.php and paste the following code in it (or use the attached file). When you have created the file invoice_group_items.php, upload it to your server and save it in
{your site}/components/com_eventbooking/emailtemplates/
Code:
<?php /** * @version 2.3.0 * @package Joomla * @subpackage Event Booking * @author Tuan Pham Ngoc * @copyright Copyright (C) 2010 - 2016 Ossolution Team * @license GNU/GPL, see LICENSE.php */ defined('_JEXEC') or die; ?> <table border="0" cellspacing="0" cellpadding="2"> <thead> <tr> <th bgcolor="#EBEBEB">Attendees</th> </tr> </thead> <tbody> <?php $i = 1; foreach($rowMembers as $rowMember) { ?> <tr> <td> <?php echo $rowMember->first_name .' '. $rowMember->last_name; ?> </td> </tr> <?php } ?> </tbody> </table>

3) Now open helper.php (make sure you’ve saved a backup) around line 4237 - look for the following code:
Code:
$itemName = JText::_('EB_EVENT_REGISTRATION'); $itemName = str_replace('[EVENT_TITLE]', $rowEvent->title, $itemName); $replaces['ITEM_NAME'] = $itemName;

Immediately under this should be a curly-bracket close or }

above the curly-bracket and below the line
Code:
$replaces['ITEM_NAME'] = $itemName;
insert the following code:
Code:
/* Added this to get group information to display on the invoice - JRD * If no group details, it will return a blank for the group list * make modifications to the HTML table returned in file I created here: * /components/com_eventbooking/emailtemplates/invoice_group_items.php * */ /* only display this if it is a group billing item */ if ($row->is_group_billing && $config->collect_member_information) { $query->clear(); $query->select('*') ->from('#__eb_registrants') ->where('group_id = ' . $row->id) ->order('id'); $db->setQuery($query); $rowMembers = $db->loadObjectList(); $data['rowMembers'] = $rowMembers; $replaces['GROUP_LIST'] = EventbookingHelperHtml::loadCommonLayout( JPATH_ROOT . '/components/com_eventbooking/emailtemplates/invoice_group_items.php', array( 'rowMembers' => $rowMembers)); } /*if it's not a group item, return null*/ else { $replaces['GROUP_LIST'] = ''; } /* End of added Code - JRD 1.25.2016 */

I put in comments and add my initials only so I can easily find it later and know what parts I changed - feel free to put your own initials or notes in the comments, of course.

4) now copy copy/upload/save the helper.php file to your server at [site]/components/com_eventbooking/helper/helper.php

5) with that done, go your administration control panel for EventsBooking (EB) and configure Invoice. Wherever you want the names of the group members to appear, simply include the tag [GROUP_LIST]. I have attached a screenshot of what mine looks like. along with a sample of the generated invoice.





6) if you want to customize what the HTML table looks like, edit the HTML code in the invoice_group_items.php file that you created above. You can actually call any of the registrant field items.

So a few things, this assumes you are NOT using the cart system. If you are, then this should also work in that system. However, I’m not using the cart system so I haven’t tested that out, but feel free to try it out and see how it works in there by adding the tag to the cart invoice configuration.

as a tip, other variables you might want to include with the names (you’ll need to create the HTML to make it appear nicely in a table format) are:

To display the total (gross) amount charged for the attendee at the following code where you want that number to appear:
Code:
<?php echo $rowMember->total_amount; ?>
for discount amount:
Code:
<?php echo $rowMember->discount_amount; ?>
for net amount (gross/total less discount):
Code:
<?php echo $rowMember->amount; ?>
registration date:
Code:
<?php echo $rowMember->register_date; ?>
Attachments:
Last edit: 8 years 2 months ago by JamiRae. Reason: cleaned up the spacing and added png of generated invoice
The following user(s) said Thank You: Tuan Pham Ngoc, zesharck, Matt Hankosky, James Riley, Marcus

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago - 8 years 2 months ago #75066 by JamiRae
Replied by JamiRae on topic personal pdf for group registrants
PS - the one big issue with making changes like this is that when an update comes out for the extension, your modified files will most likely get overridden and you'll have to do this again - so be warned of the risks :)
Last edit: 8 years 2 months ago by JamiRae.
The following user(s) said Thank You: zesharck

Please Log in or Create an account to join the conversation.

  • zesharck
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #75302 by zesharck
Replied by zesharck on topic personal pdf for group registrants
:woohoo: :woohoo: JamiRae what a work !!!

it is really nice to you to share your custom code ;) big Thx !

I will try to use your tutorial to do the same because it is something really usefull to manage registrants!

Yes I know that an upgrade will erase the code, but I will do it again and again and again ...well until Joomdonation add it officialy :p


thx JamiRae :)

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #75305 by James Riley
Replied by James Riley on topic personal pdf for group registrants
@JamiRae -- thanks for sharing the code!
...and here's to hoping it will be implemented into the core package!

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.

Please Log in or Create an account to join the conversation.

  • zesharck
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 1 month ago #75442 by zesharck
Replied by zesharck on topic personal pdf for group registrants
all works perfectly :cheer:

thx AGAIN !!!

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc