editing the admin notification email

  • Carolyn Spring
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #80190 by Carolyn Spring
editing the admin notification email was created by Carolyn Spring
HI

I am wanting to edit the email that we as admin receive when someone has made a booking. Where do I find this to edit it? I've looked through the emailtemplates php files but can't find anything.

I am wanting the email to show the person's joomla username and ID.

Thanks.

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

  • Carolyn Spring
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago - 9 years 1 month ago #80194 by Carolyn Spring
Replied by Carolyn Spring on topic editing the admin notification email
ok so I have found in the helper.php file to add the following code: line 676 buildtags

$replaces = $row->user_id;

And then I went to the admin notification email and added [USER_ID] and that worked.

Then I tried adding the line

$replaces = $row->username;

and in the admin notification email added [USERNAME] but that did NOT work.

Is username called something else??
Last edit: 9 years 1 month ago by Carolyn Spring.

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

More
9 years 1 month ago #80197 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic editing the admin notification email
$row->username won't return the data. You will need something like this:
Code:
$replaces['user_id'] = $row->user_id; if ($row->user_id) { $jUser = JFactory::getUser($row->user_id); $replaces['username'] = $jUser->username; } else { $replaces['username'] = ''; }

Regards,

Tuan
The following user(s) said Thank You: Carolyn Spring

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

  • Carolyn Spring
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #80198 by Carolyn Spring
Replied by Carolyn Spring on topic editing the admin notification email
That works perfectly - thanks!

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

More
9 years 1 month ago #80285 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic editing the admin notification email
Great. Thanks for confirming

Tuan

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

  • Carolyn Spring
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 week ago #81720 by Carolyn Spring
Replied by Carolyn Spring on topic editing the admin notification email
Hi Tuan

Since we updated EventBooking to the latest edition this no longer works. I went back into the new helper.php file and added the code outlined above again but it still doesn't work. The user ID shows the but the username doesn't show.

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

More
9 years 1 week ago #81730 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic editing the admin notification email
Hi

In latest version (2.5.0), the tag [USERNAME] is supported and you don't have to edit the code. It doesn't work on your site?

Tuan

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

  • Carolyn Spring
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago - 8 years 11 months ago #82385 by Carolyn Spring
Replied by Carolyn Spring on topic editing the admin notification email
No it isn't. In the admin email notification we receive (which I've attached a screen shot of) we get the line JoomlaID but it seems to be putting something else in the username field each time. In the email I've done a screen shot of it is "WhoisDelegate" but sometimes its "Address3". Also it seems to be unable to understand EVENT_TITLE and enter the name of the training day anymore either. Though it does show it later in the details where it has EB_EVENT_TITLE.

The code in the helper.php file (from line 709) is:







Then for our membership Pro emails its the other way round - we get the username but not the UserID.
Attachments:
Last edit: 8 years 11 months ago by Carolyn Spring.

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

  • Carolyn Spring
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #82401 by Carolyn Spring
Replied by Carolyn Spring on topic editing the admin notification email
strangely I've just realised that when people book and pay using PayPal it comes through fine. When they book and pay using Worldpay it doesn't! But I don't understand why the plugin would effect the code??

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

More
8 years 11 months ago #82435 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic editing the admin notification email
Look at the code, I can see that you or someone modified it and it doesn't look correct to me. The line $replaces = $row->username is wrong.

Anyway, I think there is a small issue with the code of generating username and I fixed it in 2.7.0. Maybe you should update your site to that version of Events Booking and check it again?

Regards,

Tuan

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

Moderators: Tuan Pham Ngoc