Support

Home Forums Event Espresso Premium Pop Up message no force login

Pop Up message no force login

Posted: March 17, 2021 at 1:32 am

Viewing 8 reply threads


markus.good@save.ch

March 17, 2021 at 1:32 am

Hi Tony
We use EE4. For event registration, the user has the option of creating a user account (thus facilitating registration with coordinates already entered) or alternatively registering for the event without a login.
Now it happens that users who actually have a user account still want to register for the event without logging in. This is not possible because the mail address entered prevents this (input field in EE4 is outlined in red). However, no pop-up message appears to explain why this is not possible. How can this be solved so that the user knows that he has to log in or knows what to do? Because it’s not clear to the user only with the red framed input field, they then always contact us and are annoyed that it doesn’t work.
Thank you for your help.

Best regards
Markus


Tony

  • Support Staff

March 17, 2021 at 12:54 pm

Hi Markus,

This is what should happen when a user registers whilst not logged in using details that match an account:

https://eventespresso.com/product/eea-wp-user-integration/#traffic-cop

Does that not happen on your site?

Can you link me to an event I can view this on?


markus.good@save.ch

March 17, 2021 at 2:05 pm

This reply has been marked as private.


Tony

  • Support Staff

March 17, 2021 at 2:40 pm

Hi Markus,

You have styles on your site that are hiding the output shown in the screenshot I linked to earlier. I’ll include another screenshot in a private reply but you need to remove/alter this:

div.highlight-bg {
    display: none;
}

So that it doesn’t hide all of EE’s highlighted sections.


Tony

  • Support Staff

March 17, 2021 at 2:40 pm

This reply has been marked as private.


markus.good@save.ch

March 17, 2021 at 10:55 pm

This reply has been marked as private.


Tony

  • Support Staff

March 18, 2021 at 6:30 am

Just checking in to confirm that removing the CSS worked for you?


markus.good@save.ch

March 18, 2021 at 11:23 am

This reply has been marked as private.


Tony

  • Support Staff

March 22, 2021 at 4:39 am

Hi Markus,

I’ll try to break down the questions/statements in the video and answer them.

Your developer states we don’t have methods for all of your fields some are custom and some our ‘our’ fields but we don’t have methods for them, this is incorrect, we have methods for all of our ‘system questions’ (because we know they exist) and we have methods which can be used to pull the answer to any custom questions.

The first field your developer checks for is ‘company’.

I checked on your registration form and can see that’s a custom question, so we can’t create a method within the code for a question we don’t know exists (custom questions can literally be anything and are created by the end user, we don’t have them in the code, technically we could create dynamic methods for those by thats not the design pattern we use). So your developer is correct in that we don’t have an $attendee->company() method, because its not a system question we add ourselves but there is still a method they can use to pull the value if they have the registration:

`$registration->answer_value_to_question( $question_id = 0, $pretty_value = true );

The ID of that custom company question is 12, so this:

echo $registration->answer_value_to_question( 12 );

Would output that value.

—-

The developer then moves onto ‘street’, referring to ‘Street, No’ in your registration form and searches for is on the EE_Attendee class.

‘Street, No’ in that example if the ‘Question Text’ of the field, and the question text value is customizable by the user within the admin (Event Espresso -> Registration Form -> Questions -> {Edit Question} -> Question Text) so you can’t rely on those values to search the code for.

‘Street, No’ in that example is the ‘address’ question within EE, you can see this within the page source. Right-click on that field and inspect, take note of the name/ID fields of each input:

ee_reg_qstn[{reg_id}][{question_id}]

reg_id is unique to each individual registration, but {question_id} is unique to each specific question within EE. System questions will use a text string there, fname, lname, email, address, address2, zip etc. Custom questions will use the ID of the question so 12, 14 in that screenshot shot custom questions.

That means for ‘Steet, No.’, you would use:

$attendee->address();

Zip code is a system question that has not had the question text changed which is why he can find it on the class but even if the question text was changes, to get the value for that question you use $attendee->zip();

‘Country’, ‘Address’ and ‘Address2’ are used on your registration form.
County = Your ‘country’ field, above zip.
Address = ‘Street, No.’ field.
Address2 = ‘P.O. Box / No.’

The ‘EE_Attendee’ object does have access to all of the fields on a registration form in itself and there’s is valid reason for that in that an Attendee can have multiple registrations on various events throughout your site. Each of the registration forms could have various different custom questions and collect various data. The attendee is still the same and the core questions (first name, last name, address, etc) all links to the same ‘Attendee’, but a question on the registration form for ‘Event A’ could be totally different from a question on the registration form for ‘Event B’ so those are linked with the EE_Registration and NOT the EE_Attendee.

A lot of this is explained in the model’s documentation which if they haven’t looked over can be found here:

https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System

Viewing 8 reply threads

The support post ‘Pop Up message no force login’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso