Only one ticket per person

Home Forums Ticket Products Event Tickets Plus Only one ticket per person

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #1196353
    Jack
    Participant

    I 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.

    #1196982
    Nico
    Member

    Hey 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,
    Nico

    #1198928
    Jack
    Participant

    Hi 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.

    #1199042
    Nico
    Member

    Thanks 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,
    Nico

    #1199058
    Jack
    Participant

    Progress! 🙂 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.

    #1199630
    Jack
    Participant

    I 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/

    #1200482
    Nico
    Member

    Hey 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,
    Nico

    #1200487
    Jack
    Participant

    Hi 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

    #1200496
    Nico
    Member

    Thanks 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,
    Nico

    PS: early evening here. Have a great one Jack!

Viewing 9 posts - 16 through 24 (of 24 total)
  • The topic ‘Only one ticket per person’ is closed to new replies.