WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Deadline for Bookings (13 posts)

  1. afreyer
    Member
    Posted 1 year ago #

    hi,

    is it possible to set a deadline for bookings, e.g. it will not be possible to serve tickets on events starting day? could i manage this with conditional placeholders?

    thank you and regards.

    http://wordpress.org/extend/plugins/events-manager/

  2. angelo
    NetWebLogic Support
    Posted 1 year ago #

    yes, try Start/End date of ticket availability under Bookings/Registration -ticket form

  3. afreyer
    Member
    Posted 1 year ago #

    thank you. is it possible to add automatically this deadline to all bookings?

  4. philipjohn
    Member
    Posted 1 year ago #

    Hiya,

    You could if you hooked into the action that saves each event, yes, although that would require some custom coding to achieve.

    Thanks,
    Phil

  5. afreyer
    Member
    Posted 1 year ago #

    which template file could i edit for it?

  6. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    You'd need to edit this template to display the deadline on the page for each event:
    /plugins/events-manager/templates/templates/events-single.php

    See the tutorial on using templates here:
    http://wp-events-plugin.com/documentation/using-template-files/

    To actually stop people booking tickets after the deadline, you'd need to need to create code that adds a filter to the booking process add prevents orders being placed after a certain date.

    That said, if you all you want to do is stop taking bookings after an event has started, that's the default setting for the Booking Cut-Off Date of each event.

  7. afreyer
    Member
    Posted 1 year ago #

    thank you - i will have a look on this template.

    for avoiding any missunderstandings: i do not want to use the default setting of cut off --> any bookings should not work on the whole events starting day.

  8. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    You mean if an event is set to start at 10am tickets should not be on sale from midnight that day / morning?

  9. afreyer
    Member
    Posted 1 year ago #

    yes! this would be nice..

  10. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    You'd need to hook into the em_event filter in classes/em-event.php and modify $EM_Event->event_rsvp_time so it = 12:00 AM

    it requires php so you may need to hire a programmer to help you.

  11. afreyer
    Member
    Posted 1 year ago #

    thank you. i think i can get it by myself. what means event_rsvp_time?
    i have created template file called "single-event.php". i think in this template i can define this function as a normally comparison with event start date and todays date. its a pitty, i thought that i can manage this with em-templates at last. but thank you for your hints. great support! :)

  12. afreyer
    Member
    Posted 1 year ago #

    ok, thank you!
    here my solution in theme_folder/plugins/events-manager/templates/templates/events-single.php

    <?php /*Begin*/
    $today = date('d-m-Y');
    
    $eventday = $EM_Event->output("#d-#m-#Y");
    
    if ($today!==$eventday)
    
    {
    echo $EM_Event->output("{has_bookings}<h2>Bookings:</h2>#_BOOKINGFORM{/has_bookings}");
    }
    else{};
    /*END*/?>
  13. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    actually, you'd not do this with a template, you could probably put it in your theme's functions.php file, see here for info on where to paste snippets:

    http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic