Posted: 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: 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:
There isn’t an element with the class “.big-event-title-hdr” on the page anymore. Steps to reproduce:
Do you know if there is another possibility to make email addresses unique? Thx in advance for your help. |
|
Hi there,
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 |
|
Thx for your answer.
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: (Tested in Google Chrome and Firefox) |
|
Select more than one ticket, does it show then? |
|
yes |
|
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 🙂 |
|
No, it needs to run also if one ticket is selected (and I am pretty sure it was visible 1-2 years ago) |
|
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 |
|
Thx – I tried the second solution and it works!!! Great! |
|
You’re most welcome, I’m glad it worked for you. |
|
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.