Plugin Required

Home Forums Ticket Products Event Tickets Plus Plugin Required

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1244488
    Russell
    Participant

    Hi

    Can you recommend a plugin to help please:

    I need to be able to ensure for an event, customers only buy one ticket price.

    e.g, Customers can purchase tickets at 3 different tickets prices currently. I don’t want them to be able to mix, but only buy one ticket price in any booking.

    Please advise – URGENT

    #1244507
    Geoff
    Member

    Hey Russell,

    Welcome back — hope you’re doing well!

    This does take a bit of custom development. I wrote up a quick script that seemed to do the trick, though I did not test it extensively and you can try adding it to your functions.php file:

    /* Tribe, limit ticket quantity */
    function tribe_limit_tickets() {
    ?>
    
    <script type="text/javascript">
    jQuery(document).ready( function( $ ) {
    // do this if tickets available
    if ( $('.tribe-events-tickets').length ) {
    // set max qty to 1
    $('.tribe-events-tickets .input-text').attr('max', 1);
    // run on input change
    $('.tribe-events-tickets .input-text').change ( function ( ) {
    // don't run the manually triggered change event
    if ( $(this).val() == 0 ) return;
    // make sure it's not more than 1
    if ( $(this).val() > 1 ) $(this).val(1);
    // change all inputs but this to 0
    // manually trigger the change event so available stock gets updated
    $('.tribe-events-tickets .input-text').not( $(this) ).val(0).change();
    });
    // add a oninput event
    $('.tribe-events-tickets .input-text').on('input', function (e) {
    $(this).change();
    });
    }
    });
    </script>
    
    <?php
    }
    add_action('wp_head', 'tribe_limit_tickets');

    We are limited in how much we can support custom development questions like this, but I hope this does the trick or at least helps get the ball rolling to give you something to work with.

    Cheers!
    Geoff

    #1244769
    Russell
    Participant

    Thanks. What does the script do exactly?

    Kind Regards,

    Russell Scott

    [https://www.dropbox.com/s/m70ldzz5saoi1df/twitter.png?raw=1] [https://www.dropbox.com/s/y4fjimqyzf44nwh/facebook.png?raw=1] [https://www.dropbox.com/s/aggwdz7lr2ika5a/youtube.png?raw=1] [https://www.dropbox.com/s/80jhz1k45mwrv44/linkedin.png?raw=1]

    Please note: I aim to respond to emails within 24hrs. For URGENT issues, please contact me by telephone.

    [https://www.dropbox.com/s/wv4rhmp1ludl02e/Russel%20Scott%202.png?raw=1]

    m. 07590 454606

    t. 08445 67 68 96

    e. [email protected]

    w. http://www.russellscottentertainment.com

    This message is for the named person’s use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mis-transmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Russell Scott Entertainment Limited reserve the right to monitor all e-mail communications through its networks.

    [https://www.dropbox.com/s/881mnhd289z1zw0/leaf.png?raw=1]Think before you print.

    Russell Scott Entertainment Limited is a company registered in England & Wales. Registered number: 07081589. Registered office: 5 Elstree Gate, Elstree Way, Borehamwood, Herts. WD6 1JD (THIS IS NOT OUR MAILING ADDRESS).

    #1244888
    Geoff
    Member

    Hi Russell,

    That script looks for the quantity inputs on the page and attempts to limit the number of tickets a person can add to one.

    Cheers,
    Geoff

    #1245118
    Russell
    Participant

    That’s not what i am requesting.

    So there are 3 ticket prices per event.

    If someone buys from one ticket price, I do not want them to be able to buy tickets from another ticket price for that particular event.

    e.g. 21st Oct in St. Albans there are £29, 34 and £39 tickets. If they buy 4 @ £29 I don’t want them to be able to also buy 2 @ £39. It’s one price band only per event per order.

    #1245198
    Geoff
    Member

    Hi Russell,

     

    Oh, gotcha. Yeah, I am afraid the snippet I provided will not do that exactly. I’m also afraid that I do not have another script that will accomplish that, nor was I able to find any other threads that might provide help.

    The snippet hopefully should at least give you a decent starting point for this customization though. Given that it already looks for the ticket quantity input and sets a maximum limit, it needs to be tailored so that it recognizes when one input is greater than 1 and then sets a maximum of 0 on all others.

    Sorry I don’t have a concrete solution for you here, but will this at least help get you started?

    Thanks.
    Geoff

    #1245227
    Russell
    Participant

    Ah I see. A shame really.

    #1245394
    Geoff
    Member

    Yeah, so sorry about that.

    It is a really interesting idea, though, and might make for a good feature request.

    Sorry again I was unable to offer a solid solution for this customization. I’ll go ahead and close this thread but let us know if any other questions come up and we’d be happy to help.

    Cheers and have a great weekend,
    Geoff

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Plugin Required’ is closed to new replies.