Booking date vs event date

This topic contains 9 replies, has 2 voices, and was last updated by  Judy Kavanagh 6 years, 1 month ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #30116

    I’m using Event Organiser Pro to allow students to book workshops. The data that is shown in Bookings does not include the date of the event, just the date they booked it. Since some of our events have the same name (they recur several times a year) I don’t know which one they are booking.

    We have course numbers that are currently stored in a custom field. These are unique for each workshop/date combination.

    So either I need to get the event date or preferably, the course number. If all else fails I can include the course number as part of the course title but that’s not my first choice.

    How do I do this?

    Thanks

    Judy Kavanagh
    #30117

    Reply added because I forgot to check Notify me by email

    Judy Kavanagh
    #30134

    Hi Judy,

    I replied to the other thread regarding including a custom field. Hopefully that will work for you.

    You can include the event date as follows:

    %event_date{'d F Y'}{'G:ia'}%
    

    (The string 'd F Y' and 'G:ia' are just the desired format of the date and time components respectively of the event’s datetime). This page contains a list of available email tags.

    Stephen Harris
    #30135

    Where would I find the code that controls downloading the bookings? We would like to be able to download the data including the course dates for our course administrator.

    I’ve just been thinking about how our courses are set up and maybe we need to change our system. Currently each recurrence of a class (which may be one or more dates) is specified as a separate event. Maybe we should instead count them all as one event. However, I’m not sure how to specify multiday events where an entire course is taught on, say, Saturday AND Sunday. The event would then happen again in a month for another Saturday and Sunday where the same material is taught. You would only sign up for one of the weekends.

    Judy Kavanagh
    #30137

    Hi Judy,

    You don’t need code for that, the CSV download already includes the event date.

    When selling tickets by date the customer would select a single occurrence, and place a booking for that. In your example, therefore you could create a recurring event which occurs every month on the Saturday and lasts two days. That is, the Saturday-Sunday is one occurrence, and not two separate occurrences.

    That sounds like it would work for your situation, although it does mean that every occurrence of that event must be two days.

    Stephen Harris
    #30142

    Thanks Stephen.

    When I make the form so the customer can pick their dates to have a two day workshops I have to make the event go from 9 am on the first day to 5 pm on the second day which looks like it involves a sleepover. Am I doing this right? If I break it up into two separate days then it seems to be two different classes.

    Our workshops tend to recur once a year or once a season so I’m tempted to just list them as separate events. This brings up the problem of dates again. With two events that have the same name where the bookee doesn’t have to choose a date the csv file does not include the event date.

    Judy Kavanagh
    #30167

    Hi Judy,

    Yes, that’s correct. If you set it up the two days as a single occurrence it technically runs from the beginning of the first day to the end of the second day.

    This may not be a problem depending on how you are presenting events to users (e.g. month view vs week/day view).

    If you decide to book by ‘series’ and create new events for each weekend I’ll provide some example code of how you can include the event date and custom fields in the CSV export.

    Stephen Harris
    #30181

    Thanks. We’ve decided to just go with making each session of a course as a separate event. The most a single class is repeated is maybe 6 times a year.

    When someone books by series rather than date, the event date is NOT downloaded in the csv file. However, we are putting the course number into the title so we can distinguish events with the same name.

    • This reply was modified 6 years, 1 month ago by  Judy Kavanagh. Reason: spelling
    Judy Kavanagh
    #30192

    Hi Judy,

    Yes, my apologies, you’re right the date isn’t included unless selling by date. Here’s a snippet for including a custom field (in this example coursenumber) in the CSV export:

    add_filter('eventorganiser_export_bookings_headers', function($headers,$export){
        $headers['course_number'] = 'Course Number';
        return $headers;
    }, 10, 2);
    
    add_filter('eventorganiser_export_bookings_cell_course_number', function( $value, $booking, $export){
    
        $event_id = eo_get_booking_meta( $booking->ID, 'event_id' );
        $value = get_post_meta( $event_id, 'coursenumber', true );
    
        return $value;
    }, 10, 3);
    
    Stephen Harris
    #30195

    Perfect! Thanks

    Judy Kavanagh
Viewing 10 posts - 1 through 10 (of 10 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.