Support

Home Forums Event Espresso Premium Add the “Organization Name” from the form to the ticket and message.

Add the “Organization Name” from the form to the ticket and message.

Posted: November 20, 2024 at 2:57 pm

Viewing 18 reply threads


WalkerDesigner

November 20, 2024 at 2:57 pm

I want the registrants organization to appear on the confirmation email, invoice, and on the badge. There is no shortcode for that and adding the form field admin label results in an error. Is there a way to pull in that field data and display it where I want it? I found this topic https://eventespresso.com/topic/company-name-in-emails/ but I’m not understanding it, as it seems targeted towards another issue for email administartors.


Tony

  • Support Staff

November 21, 2024 at 5:57 am

Hi there,

I want the registrants organization to appear on the confirmation email, invoice, and on the badge.

So is this a custom question you have created within EE and the ‘Question text’ for that question is set to ‘Organization Name’?

If so, we have a shortcode to pull in the value for that, you can use.

If its set on the Primary Registrant you have:

[PRIMARY_REGISTRANT_ANSWER_*{question_text}]

So in your case, if the above is correct, that would be:

[PRIMARY_REGISTRANT_ANSWER_*Organization Name]

Is that what you are looking for?


WalkerDesigner

November 21, 2024 at 1:20 pm

Yes – that is exactly what i needed – thank you!


WalkerDesigner

November 21, 2024 at 2:19 pm

I just tried this and it doesn’t appear to be working. Do i need to add the Question Field as you did or is it supposed to be the admin label?


Tony

  • Support Staff

November 22, 2024 at 2:21 am

You use the question text field as above, it needs to match exactly.

Does your shortcode question text value match exactly what you have for the question itself?


WalkerDesigner

November 22, 2024 at 3:05 pm

I’ve done some testing. Other shortcodes work, but it appears that the [PRIMARY_REGISTRANT_ANSWER_*{question_text}] will not work, even if I try other questions in the form. I really need to get this resolved. I think the shortcode is just broken. my form is at https://olc-events.com/olc-online-registration/ can you please take a look. I provided a user for Tony for a previous issue and it is still active. Thanks for you help on this.


Tony

  • Support Staff

November 25, 2024 at 5:07 am

Hi there,

I don’t think the shortcode is broken as it’s working as expected on multiple test sites. A quick example:

Question: https://monosnap.com/file/zv9Yl49Sz6FUCbXVVQgkF4PlKput9Z

Shortcode in use: https://monosnap.com/file/YJ0MuKsAiV2h5pJHlGBkb94oM7fUI1

Output: https://monosnap.com/file/EksaIggL7gzuTn9yrCbFk6aKd4ebon

The answer I provided for that question is “Org Name Q – Event Espresso”.

I provided a user for Tony for a previous issue and it is still active.

We don’t keep credentials but if you reset the password and send the details over using this form:

https://eventespresso.com/send-login-details/

I’ll take a look.


WalkerDesigner

November 25, 2024 at 5:26 pm

This reply has been marked as private.


Tony

  • Support Staff

November 26, 2024 at 2:42 am

This reply has been marked as private.


WalkerDesigner

November 26, 2024 at 8:51 am

This reply has been marked as private.


Tony

  • Support Staff

November 29, 2024 at 4:11 am

Very strange!

The shortcode is correct, and works with the same setup locally for me.

I know the Pricing add-on hooks into the shortcode generation so you could try loading the ticket template with that Plugin disabled to see if that makes a difference.

I can troubleshoot the shortcode parsing within core to confirm its working there but for that I’ll need to add some debug code to core so will need file access (FTP/SFTP/etc), we don’t make code changes with the WP code editor.


WalkerDesigner

December 11, 2024 at 4:25 pm

Hi Tony – I’m still working on this. I disabled the price modifier and the Company Name appears now on the ticket. Do you know if there is a way to use the price modifier and still get the company name on there? Or is there a workaround to do add-ons to the ticket? I really need both features or an equivelant way to do the same things.


Tony

  • Support Staff

December 12, 2024 at 5:53 am

Do you know if there is a way to use the price modifier and still get the company name on there?

In short sounds like the price modifier needs to be updated so that (I’m guessing here) doesn’t return an empty string for question’s its not related to.

Can you send me a copy of the price modifier? I can’t promise a fix (it’s not an add-on we provide support for), but I’ll take a look and see if it’s something obvious.


WalkerDesigner

December 12, 2024 at 3:07 pm

This reply has been marked as private.


Tony

  • Support Staff

December 13, 2024 at 7:26 am

Ok, so this is a bug related to how the price modifier add-on parses the [PRIMARY_REGISTRANT_ANSWER_* shortcodes (actually any ANSWER_* shortcode).

The idea of the ANSWER_* shortcodes is you pass a question text value to the shortcode, and EE parses that specific question/answer based on finding the related question for the value you gave and then working out if the registration has an answer related to that specific question.

The pricing add-on hooks into the shortcode parser. For ANSWER_* shortcodes, it loops over ALL questions related to the registration and checks to see if they are ‘pricing’ questions. The first one it finds it will try to pull values from the pricing tables and return them. Those may be completely unrelated to the shortcode/question it should be parsing; in fact, they are likely unrelated most of the time.

So, in summary, EE parses [PRIMARY_REGISTRANT_ANSWER_*Organization Name] and it looks for a specific question/answer related to the registration, let’s say it finds an answer and it is ‘Event Espresso’. The pricing modifier add-on then jumps in and parses ‘[PRIMARY_REGISTRANT_ANSWER_*Organization Name]’ (at which point EE already knows the value should be ‘Event Espresso’), loops over all questions related to the registration, finds the first ‘pricing’ question, pulls in values related to that question form the custom pricing tables and returns them as the value for [PRIMARY_REGISTRANT_ANSWER_*Organization Name].

That’s why you end up with no value and it needs to be fixed in the price modifier add-on.

If I can’t get this to work, how do I handle add ons for an event?

Using the price modifier add-on is the only way to add additional values to a transaction based on questions.

The other way to handle that setup would be to create individual tickets matching the additional values:

Admission = X
Admission + Add-on 1 = X + Y
Admission + Add-on 2 = X + Z
Admission + Add-on 1 + Add-on 2 = X + Y + Z

I don’t think that will work for your set-up.


WalkerDesigner

December 13, 2024 at 2:12 pm

OK – I emailed Aparna about it. I hope they can fix it. If they can’t do you know if there is a script or something that I can add to the ticket that can pull in the Company Name from the database so I can work around the shortcode?


Tony

  • Support Staff

December 13, 2024 at 3:37 pm

No, because [PRIMARY_REGISTRANT_ANSWER_*] effectively is the script to do just that. That’s a dynamic shortcode that can retrieve the answer to any registration question linked to the Primary Registrant.

So, to rephrase the above, you are asking for a script to dynamically pull in the registration question answer to replace the script that dynamically pulls in the registration question answer. That’s not something we have created outside of core.

Having said that, it is possible to hook into the shortcode parser in the same way the Price Modifier add-on does, pulling in the correct value. For this to work, it would need to be a later priority than the price modifier, doing its thing after the add-on has to return the correct value.

If it’s a deal breaker for you, it’s something I can put together using a support token but Aparna may be able to fix this relatively quickly.


WalkerDesigner

December 13, 2024 at 4:05 pm

This reply has been marked as private.


Tony

  • Support Staff

December 13, 2024 at 4:39 pm

This reply has been marked as private.
Viewing 18 reply threads

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso