Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: A couple of hacks for everyone

A couple of hacks for everyone 16 years 6 months ago #1290

  • seventhwhiskey
  • seventhwhiskey's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
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\");

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

A couple of hacks for everyone 16 years 5 months ago #1485

  • imgfx
  • imgfx's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Is this file available already edited for download?

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

A couple of hacks for everyone 16 years 5 months ago #1486

  • dthadmin
  • dthadmin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 5470
  • Thank you received: 3
Send a PM to seventhwhiskey and ask him to send it to you.

- seventhwhiskey, please do not post the modified file here. Thanks.

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

A couple of hacks for everyone 16 years 5 months ago #1487

  • seventhwhiskey
  • seventhwhiskey's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
imgfx, it\'s not available for download because I have done a bunch of other edits to the script for my own use. It shouldn\'t take more than a few minutes to make the changes though.

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

A couple of hacks for everyone 16 years 5 months ago #1499

  • kenlyle
  • kenlyle's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 68
  • Thank you received: 0
Thanks, seventhwhiskey !

I thin that these basic features (especially the date ones) should be included in future versions of DTRegister.

dthadmin, can you commit to get these in? Those of us with recurring events would really appreciate it.

Thanks,
Ken

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

  • Page:
  • 1
Time to create page: 0.259 seconds