Home › Forums › Ticket Products › Event Tickets Plus › Only one ticket per person
- This topic has 24 replies, 3 voices, and was last updated 9 years, 4 months ago by
Jack.
-
AuthorPosts
-
November 23, 2016 at 12:22 am #1196353
Jack
ParticipantI just noticed there are these php opening and closing tags. Until now I removed the opening tag because the functions file already has an opening tag. Leaving that opening tag OR removing both the opening and closing tags from your code results in a blank page on the site.
<?php /* Tribe, limit ticket qty */ function tribe_limit_tickets() { ?>I also tried to remove all php tags from your code and simply echo the javascript, escaping both ” ofcourse, but this also results in a blank page.
November 24, 2016 at 6:17 am #1196982Nico
MemberHey Jack,
Sorry the snippet is giving you trouble still! Can you please paste the last version I sent without the opening tag and let me know? I just want to verify is the code is printed in the page at least! Also once you do this please clean the cache from W3 total cache 😉
Thanks,
NicoNovember 29, 2016 at 1:21 am #1198928Jack
ParticipantHi Nico,
We already started with the tickets, so I did not want to fiddle around too much at that moment.
The code is printed in the source: http://storage6.static.itmages.com/i/16/1129/h_1480411182_1027478_d9f9805286.jpeg
I also purged all cache, but still no change I’m afraid.November 29, 2016 at 7:30 am #1199042Nico
MemberThanks for following up Jack!
The code is getting correctly printed out on the page now, but I spotted an error in the JS selector which I think will make it work now:
https://gist.github.com/niconerd/466453697713a569dcc97d924340fa01
Hope to nail it this time! Sorry for the back and forth on this.
Best,
NicoNovember 29, 2016 at 7:44 am #1199058Jack
ParticipantProgress! 🙂 Thanks!
It works now when using the up and down arrows, but I can enter a number higher than 1 manually in the field, and then more tickets can be ordered.
November 30, 2016 at 1:31 am #1199630Jack
ParticipantI think this topic where András is helping me with, is related to my question of max one ticket per person: https://theeventscalendar.com/support/forums/topic/is-there-a-way-to-find-and-delete-double-entriesattendees/
December 1, 2016 at 11:51 am #1200482Nico
MemberHey Jack!
Thanks for letting me know about this other thread! Andras already reached out to me about this.
I think both solutions are legit. Maybe the radio button makes more sense from a UI point of view (Why have an input if I can also select 1 or 0?). In any case I amended the script to account for the ‘manual input’ scenario you mentioned:
https://gist.github.com/niconerd/466453697713a569dcc97d924340fa01
Please let me know if it works for you,
Best,
NicoDecember 1, 2016 at 12:12 pm #1200487Jack
ParticipantHi Nico,
I’m glad I can now say that this works! 🙂 Thank you very much for fixing this for me.
We did receive the request by the university, for which we are doing this, that visitors would only have to click on one time period and that would be their choice, thus their ticket (one ticket), so that would indeed mean a radio button kind of choice, but this works fine too :).Perhaps this situation, your solution and/or a radio button solution can be used to enhance the plugin in the future.
Have a nice evening! (at least, it is evening here where I live).
Jack
December 1, 2016 at 12:34 pm #1200496Nico
MemberThanks for the quick follow-up! I’m stoked to hear this finally works for you 🙂
Perhaps this situation, your solution and/or a radio button solution can be used to enhance the plugin in the future.
The code in this thread will surely help some other folks with similar situations. But I’m not sure we would want to include this code in the plugin as the use case is a bit specific.
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Cheers,
NicoPS: early evening here. Have a great one Jack!
-
AuthorPosts
- The topic ‘Only one ticket per person’ is closed to new replies.
