So I made some modifications today and figured I\'d better share them with everyone. Below are hacks to include Dates in emails, Dates in Records, (I have a lot of events with the same name) and change the tax mount in paypal (in case for some reason you don\'t want to use the tax amount that\'s set up in you paypal profile) or add any other fields acceptable to paypal.
Dates in Records:
To add the event date onto the registration records page:
in admin.dtregister.html.php Line 260 between
<th><?php echo DT_EVENT; ?></th>
and
<th><?php echo DT_AMOUNT; ?></th>
add
<!-- Custom -->
<th><?php echo Event_Date; ?></th>
<!-- Custom -->
so it should look like
<th><?php echo DT_EVENT; ?></th>
<!-- Custom -->
<th><?php echo Event_Date; ?></th>
<!-- Custom -->
<th><?php echo DT_AMOUNT; ?></th>
on line 317 between
<td align=\"center\"><?php echo $row->title;?> </td>
and
<td align=\"center\"><?php echo $row->amount;?></td>
add
<!-- Custom -->
<td align=\"center\"><?php echo $row->publish_up;?> </td>
<!-- Custom -->
so it should look like
<td align=\"center\"><?php echo $row->title;?> </td>
<!-- Custom -->
<td align=\"center\"><?php echo $row->publish_up;?> </td>
<!-- Custom -->
<td align=\"center\"><?php echo $row->amount;?></td>
in admin.dtregister.php around Line 2753(2760) find the sql query that reads
$listsql=\"select a.userId as id,a.userOrganization,a.userFirstName,a.userLastName,a.userEmail,a.userType,a.register_date,a.eventId,a.payment_type,a.pay_later_option,a.pay_later_paid,b.groupName,d.title,
e.numberOfPerson,e.amount,b.groupId,e.examount,e.examountfor,a.Comments from #__dtregister_user a,#__dtregister_group b,
#__events d , #__dtregister_group_amount e where a.eventId=d.id $where and
a.userId= b.useid and b.groupId=e.groupId order by a.userId DESC\";
and make it read
$listsql=\"select a.userId as id,a.userOrganization,a.userFirstName,a.userLastName,a.userEmail,a.userType,a.register_date,a.eventId,a.payment_type,a.pay_later_option,a.pay_later_paid,b.groupName,d.title,d.publish_up,
e.numberOfPerson,e.amount,b.groupId,e.examount,e.examountfor,a.Comments from #__dtregister_user a,#__dtregister_group b,
#__events d , #__dtregister_group_amount e where a.eventId=d.id $where and
a.userId= b.useid and b.groupId=e.groupId order by a.userId DESC\";
note all I did was add \"d.publish_up,\" to the end of the first line.
Dates in Emails
To add the event date into the admin email
in dtregister.php around line 11472 change
$sql = \"select a.title,b.email from #__events a,#__dtregister_group_event b where a.id=b.eventId AND a.id=$eventId\";
to read
$sql = \"select a.title,a.publish_up,b.email from #__events a,#__dtregister_group_event b where a.id=b.eventId AND a.id=$eventId\";
on 11477 after
$eventname = $events[0]->title;
add
$eventdate = $events[0]->publish_up;
around 11577, 11694, change
$adminmsg.=\"<tr><td colspan=2>$rowUser->userFirstName $rowUser->userLastName has registered for the $eventname.</td></tr>\";
to read
$adminmsg.=\"<tr><td colspan=2>$rowUser->userFirstName $rowUser->userLastName has registered for the $eventname on $eventdate.</td></tr>\";
on 14428 copy
$sql=\"Select title From #__events Where id=$eventId\";
$database->setQuery($sql);
$eventName=$database->loadResult();
and below it paste and modify it to read
$sql=\"Select publish_up From #__events Where id=$eventId\";
$database->setQuery($sql);
$eventDate=$database->loadResult();
14446 change
<tr><td colspan=\'2\'>You have a new Waiting List addition for the $eventName. The new add-on details are:</td>
to read
<tr><td colspan=\'2\'>You have a new Waiting List addition for the $eventName on $eventDate. The new add-on details are:</td>
on 17439 copy
$sql=\"Select title From #__events Where id=$eventId\";
$database->setQuery($sql);
$eventName=$database->loadResult();
and below it paste and modify it to read
$sql=\"Select publish_up From #__events Where id=$eventId\";
$database->setQuery($sql);
$eventDate=$database->loadResult();
on 17709 change
$adminmsg.=\"$groupName has registered for the $eventName.<br><br>\";
to read
$adminmsg.=\"$groupName has registered for the $eventName on $eventDate.<br><br>\";
on 23751 copy
$sql=\"Select title From #__events Where id=$eventId\";
$database->setQuery($sql);
$eventName=$database->loadResult();
and below it paste and modify it to read
$sql=\"Select publish_up From #__events Where id=$eventId\";
$database->setQuery($sql);
$eventDate=$database->loadResult();
on 23963 change
$adminmsg.=\"$groupName has registered for the $eventName.<br><br>\";
to read
$adminmsg.=\"$groupName has registered for the $eventName on $eventDate.<br><br>\";
Add Paypal Tax
***NOTE: Adding paypal fields will apply them to ALL of your paypal transactions through DTRegister***
to change the paypal tax value (or use any other of paypal\'s custom fields for that matter)
dtregister.php Line 4738 and 9281
after
$p->add_field(\'currency_code\',$currency_code);
add
$p->add_field(\'tax\',\"0\");
or any other of paypal\'s fields in the format
$p->add_field(\'field_name\',\"field_value\");