• Resolved jedfirestone

    (@jedfirestone)


    I found this in the list of updates from version 1.2.2 – you can limit the number of tickets per event for a purchaser?

    How would I implement it?

    1.2.2

    Allow tickets to be sold on posts with status ‘private’
    Show event date in reports drop down
    Revised HTML so it’s easy to hide remaining tickets notices
    Prevent user from increasing number of tickets in cart to more than available.
    Add filter to enable max ticket limit per purchase/type for an event. ‘mt_max_sale_per_event’
    Add fees field to reports output in addition to sales values.
    Add filter on cart total used to determine whether or not to show payment gateway form.

    https://www.ads-software.com/plugins/my-tickets/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    Thread Starter jedfirestone

    (@jedfirestone)

    Fantastic, thanks! I even figured out how to use it. hahahahah

    Hi Joe, and thanks for this *wonderful* plugin!
    I successfully changed the template for standard ticket (adding buyer’s name) but I have a question.
    I saw your filter for limiting the purchases and I’m wondering how to apply it: should I put the filter file into the plugin directory, or in my theme directory? And which function should call it?
    Sorry for the naive questions and for reopening this thread…

    All the best

    Well… It wasn’t too difficult: I put it here for future usage (if any).

    The filter can be called into mt-fields-api.php and the function put at the very end of this file.

    I’d be careful for the next upgrade…

    Thanks again.

    Don’t understand how to use it, i can’t make it work… sorry

    Hi gustemps,

    That’s what I did:

    1]
    Open the file mt-fields-api.php (in the plugin directory) and go at the very end of it

    2]
    Put the following lines:

    
    //GUSTEMPS, added this
    function my_limit_max_sales( $default ) {
            return 3; // limit of 3 tickets of given type can be added to cart.
    }
    

    Of course I put 3, but you can set a number of your choice.

    Plugin Author Joe Dolson

    (@joedolson)

    I would generally suggest adding it as a separate plugin. The linked example can be copied into a photo file and uploaded into your plugins directory, then activated. Adding it into a core plugin file means it will be overwritten every time you update the plugin.

    Hi Joe, sorry for reopening this thread.
    I used the plugin that limits the purchase of tickets.

    Although the purchaser only pays for the number of tickets set in the file (eg 10), the form retains the option to choose any number (eg 100). Cart displays the maximum number set in the file, but the price of tickets actually chosen. This thing scares! : D

    It should not allow to choose a higher number. It’s possible?

    Thanks for everything

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘mt_max_sale_per_event.. HOw to?’ is closed to new replies.