Modifying Certificate Code

  • Michael Redmond
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #154414 by Michael Redmond
Modifying Certificate Code was created by Michael Redmond
I have created a custom field called SESSIONS that I use to let registrants select which sessions they want to attend and charge them appropriately. That is working. Each session is worth a certain number of continuing education credits. I want to show the number of education credits earned on the certificate. Is there a way to modify the code of the certificate to read the value of the custom field and display that appropriate number of hours based on the value of the filed.

For example, can PHP code be added in the certificate's HTML code?
Perhaps
Code:
<?php if ( ?> [SESSIONS] <?php = 1 then echo "1 hr" else echo "2 hrs"; ?>
or something like that?

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

More
2 years 5 months ago #154416 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Modifying Certificate Code
You can try to use conditional text feature eventbookingdoc.joomservices.com/basic-setup/conditional-text

(See example #7 in that list)

{ebShowText [NAME_OF_FIELD]=Yes}This text will be shown the value of custom field name_of_field has value Yes{/ebShowText}

Regards,

Tuan

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

More
2 years 5 months ago #154417 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Modifying Certificate Code
BTW, your subscription for Events Booking was expired. Please renew your subscription to continue receiving support and update from us now and in the future

Regards,

Tuan

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

  • Michael Redmond
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #154428 by Michael Redmond
Replied by Michael Redmond on topic Modifying Certificate Code
My subscription was renewed in May 2022 and is current thru May 2023.
 

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

  • Michael Redmond
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #154430 by Michael Redmond
Replied by Michael Redmond on topic Modifying Certificate Code
Tuan,

Where do I place this code. I placed it in the Editor (see below) as a test
 

When the certificate is downloaded, it simply prints the ebShowText line right where it was on the Editor view.
 

Please advise. And thanks for your help.

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

  • Michael Redmond
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #154455 by Michael Redmond
Replied by Michael Redmond on topic Modifying Certificate Code
Anybody have any experience adding this kind of code to an Invoice or Certificate?
I'd really appreciate the help.

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

More
2 years 5 months ago #154459 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Modifying Certificate Code
Hi Michael

Need a space character between {ebShowText and [SESSIONS]

So change {ebShowText[SESSIONS] to {ebShowText [SESSIONS]

Regards,

Tuan

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

  • Michael Redmond
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #154464 by Michael Redmond
Replied by Michael Redmond on topic Modifying Certificate Code
Tuan,

Clearly I am doing something wrong. I put the space in, and it still just prints out the line of code itself, but with the value of SESSIONS inserted. It doesn't appear to be testing the condition.

I am going to send you credentials to log into the site on a Support Ticket. Perhaps you can log in and see what I am doing wrong.
Thanks.

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

More
2 years 5 months ago #154465 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Modifying Certificate Code
OK. You can submit a support ticket and we will check it directly on your site

Tuan

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

  • Bayerischer Judo-Verband
  • Offline
  • New Member
  • New Member
More
2 years 4 months ago #155313 by Bayerischer Judo-Verband
Replied by Bayerischer Judo-Verband on topic Modifying Certificate Code
Hi Tuan,

is there already a solution found? I have the same issue here, wanted to have a conditonal text in a certificate, it doesn't work. As stated in the before posts just the {ebShowText ... /ebShowText} is printed in the certificate, but not depending on the given condition. Tried it already with and without space before and after the tag, the operator, the compare value - it makes no difference. Seems to me that the ebShowText is not taken care at all. Help is very appreciated...

Best regards,
Ronny

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

Moderators: Tuan Pham Ngoc