Support

Home Forums Event Espresso Premium Unique emails upon registration

Unique emails upon registration

Posted: June 23, 2021 at 5:40 am

Viewing 9 reply threads


netwerker

June 23, 2021 at 5:40 am

Hi,

2 years ago I have used the code of the following support thread to make email addresses unique for one event:
https://eventespresso.com/topic/unique-emails-upon-registration/

Today I have reactivated my page (because of covid we had no events in the last year) but the registration does not work anymore because of the following line of the script:

var event = $('.big-event-title-hdr').attr('id');

There isn’t an element with the class “.big-event-title-hdr” on the page anymore.

Steps to reproduce:

  1. Go to https://www.meinstartplatz.at/veranstaltungen/31-schilcherlauf-fc-sauzipf/?
  2. Select one product
  3. Go to checkout page
  4. Try to submit

Do you know if there is another possibility to make email addresses unique?
Or do you know how to fix the script (Link to the script: https://www.meinstartplatz.at/wp-content/themes/twentyseventeen-child/js/ajax-registration.js?ver%5B0%5D=jquery)

Thx in advance for your help.


Tony

  • Support Staff

June 23, 2021 at 7:40 am

Hi there,

There isn’t an element with the class “.big-event-title-hdr” on the page anymore.

Sure there is, that class hasn’t been changing within EE.

If you use Chrome Dev Tools (or similar) on that page you’ll see the element:

https://monosnap.com/file/YOesHxddIdD7ptiTjzxQVLUWeU3G3y

The script you linked to will work, however, it looks like someone has edited the file and there are now a bunch of whitespace in places that will break it.

The whitespace needs to be removed for that script to work:

https://gist.github.com/Pebblo/51510374b1f8cb91b8b4450a86ca8a6c


netwerker

June 24, 2021 at 5:51 am

Thx for your answer.

Sure there is, that class hasn’t been changing within EE.

If you use Chrome Dev Tools (or similar) on that page you’ll see the element:

https://monosnap.com/file/YOesHxddIdD7ptiTjzxQVLUWeU3G3y

That’s really strange. If you compare your screenshot with mine you’ll see that there is a difference. In my screenshot the .big-event-title-hdr is missing in both frontend and source code.

Screenshot:
https://www.dropbox.com/s/gg67rrwylqnozjk/Bildschirmfoto%202021-06-24%20um%2013.49.17.png?dl=0

(Tested in Google Chrome and Firefox)


Tony

  • Support Staff

June 24, 2021 at 6:01 am

Select more than one ticket, does it show then?


netwerker

June 24, 2021 at 6:02 am

yes


Tony

  • Support Staff

June 24, 2021 at 6:10 am

Ok, so the code in question only needs to run when 2 or more tickets are selected so it should work fine.

I’ll check into why the header isn’t shown when only a single ticket is selected, but that wont prevent the code from running on your site 🙂


netwerker

June 24, 2021 at 6:14 am

No, it needs to run also if one ticket is selected (and I am pretty sure it was visible 1-2 years ago)
So it would be nice if you look into it. Thx.


Tony

  • Support Staff

June 28, 2021 at 10:03 am

There are a couple of options for this.

One, is to copy the template file EE uses for that output and add the element into that template, like so:

https://gist.github.com/Pebblo/453524a80317703f7fd8f172e4b9793d

You add that file to the root directory of your site’s theme (preferably a child theme) to override the default EE template.

That adds the event name in the element you mentioned, however, that will likely run into issues if you start to use the Multi Event Registration add-on.

Another (imo better) option is to hook into the checkout process and check for a registration before SPCO processes them, and example of that can be found here:

https://gist.github.com/Pebblo/1f0a3fbee4531a30bba14d2b04a05a72


netwerker

July 1, 2021 at 11:17 am

Thx – I tried the second solution and it works!!! Great!


Tony

  • Support Staff

July 2, 2021 at 4:00 am

You’re most welcome, I’m glad it worked for you.

Viewing 9 reply threads

The support post ‘Unique emails upon registration’ 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