Events Made Easy Forums Bug fixed or feature request implemented "minimum spaces" in a multiseat event doesn't work

  • This topic has 18 replies, 2 voices, and was last updated 9 years ago by Anonymous.
Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #55057
    Anonymous
    Inactive

    … or i’m missunderstanding something.

    Created a multiseat event with seven kind of seats and set minimum as well as maximum seat to “1” (because attendes should exactly book only one seat)

    But i get bookings with 0 (zero) seats, if an atendee makes no choice at one of the offered seats. I have no clue, what i’ve done wrong.

    #55058
    Franky
    Keymaster

    It seems I made a mistake with my interpretation of how “<" and ">” work for arrays, that is the problem here.
    See if this solves it for you:
    http://plugins.trac.wordpress.org/changeset/1277373

    #55059
    Anonymous
    Inactive

    OK, changed the two (three with readme) files and wanted to copy an existing “live” event for testing (because i don’t want do mess up bookings of a live event).

    If i remember right, there has been an option to copy an event. After “updating” eme_functions.php and eme_rsvp.php this option is gone. Also some information on events in the events listing on admin side.

    #55060
    Anonymous
    Inactive

    Cause the lack of other options i tried a booking on my live event and choosed no seat. The booking was accepted. Not good!

    #55061
    Franky
    Keymaster

    Make sure to only apply the changed lines, copying over the complete files will result in problems.

    #55062
    Anonymous
    Inactive

    I’m on EME 1.5.51 and the coresponding lines you pointed out look a little different in my eme_rsvp.php, so i rolled back to the original files.

    Is there a way to send you the files und you can do the correct changes for me, please? Because i’m running a live event with active bookings i don’t want to mess up my event and bookings. 😉

    #55063
    Anonymous
    Inactive

    … or will there be a soon release of 1.5.52?

    #55064
    Franky
    Keymaster

    Sorry, but that I don’t do. Changing the eme_functions.php file should be easy (just the 4 new functions to add), and in eme_rsvp.php it is only 2 lines to change …

    #55065
    Anonymous
    Inactive

    OK, accepted. I’ll try by myself. And if it doesn’t work i’ll wait for the next release. 😉

    #55066
    Franky
    Keymaster

    Well, I assume a tester can’t hurt either. So send me some admin login details, I’ll change the files in place (please take a backup of both files)

    #55067
    Anonymous
    Inactive

    Thanks for your offer. But to clear this: Changing / adding a few lines of code is not the problem and the additions to eme_functions.php are easily done. But the lines 1114 and 1119 in my eme_rsvp-php are different to your print:

    1102      // if any required field is empty: return an error
    1103      $missing_required_fields_string=join(", ",$missing_required_fields);
    1104      $result = sprintf(__('Please make sure all of the following required fields are filled out correctly: %s','eme'),$missing_required_fields_string);
    1105   } elseif (!is_email($bookerEmail)) {
    1106      $result = __('Please enter a valid mail address','eme');
    1107   } elseif (!eme_is_multi($min_allowed) && $bookedSeats < $min_allowed) {
    1108      $result = __('Please enter a correct number of spaces to reserve','eme');
    1109   } elseif (eme_is_multi($min_allowed) && eme_is_multi($event['event_seats']) && $bookedSeats_mp < eme_convert_multi2array($min_allowed)) {
    1110      $result = __('Please enter a correct number of spaces to reserve','eme');
    1111   } elseif (!eme_is_multi($max_allowed) && $max_allowed>0 && $bookedSeats>$max_allowed) {
    1112     // we check the max, but only is max_allowed>0, max_allowed=0 means no limit
    1113      $result = __('Please enter a correct number of spaces to reserve','eme');
    1114   } elseif (eme_is_multi($max_allowed) && eme_is_multi($event['event_seats']) && eme_get_multitotal($max_allowed)>0 && $bookedSeats_mp >  eme_convert_multi2array($max_allowed)) {
    1115      // we check the max, but only is the total max_allowed>0, max_allowed=0 means no limit
    1116      // currently we don't support 0 as being no limit per array element
    1117      $result = __('Please enter a correct number of spaces to reserve','eme');
    1118   } elseif (!is_admin() && $registration_wp_users_only && !$booker_wp_id) {
    1119      // spammers might get here, but we catch them
    1120      $result = __('WP membership is required for registration','eme');
    1121   } elseif (is_array($eval_filter_return) && !$eval_filter_return[0]) {

    So i changed lines 1109 and 1114 in my case. But 0-bookings are still possible.

    #55068
    Franky
    Keymaster

    Ok, but I think I got it for you: did you make the “minimum seats” also multi-aware?
    Because if you just set “1” there, it means at least 1 seat should be booked in total. If you don’t want 0-seats, you should specify the minimum seats per price, by setting e.g. in the min.seats: “4||2||1” or so (meaning: at least 4 seats of price category 1 need to be booked, at least 2 seats of price cat 2 and at least 1 seat of price cat 3)

    #55069
    Anonymous
    Inactive

    No. And yes.
    No, i didn’t make them multi-aware because
    Yes, i want a minimum and also maximum of 1 seat booked out of seven different seats.

    I try to explain:

    The Event is a “vehicle meeting”. We offer six guided tours with 17 seats/spaces each and a non-tour with five seats/spaces which is a total of 107 seats/spaces. Each atendee should pick one of the guided tours – or the non-tour – and book exactly one seat/space for his car.

    We offer also included hotel-booking in our reservation form. The hotel has exactly 107 rooms. So if one chooses no guided tour (or the non-tour) and does a “0-booking”, the hotel runs out of rooms while we offer still seats/spaces at our tours.

    That’s the challenge. 😉

    Here you have a screenshot of my seat-settings (the event is free of charge)

    seat settings

    #55070
    Franky
    Keymaster

    Ok, apparently it is an issue with the combination of the attendance-setting. Let me check this …

    #55071
    Franky
    Keymaster

    This should fix it (ignore the indentation fixes):
    http://plugins.trac.wordpress.org/changeset/1279010

    #55072
    Anonymous
    Inactive

    Thanks for your awesome support! But before i change my files to the above, should i …

    a) start with my edited files and if, did i do the changes on the right places in eme_rsvp.php? Or …

    b) start with the original, unchanged files?

    #55073
    Franky
    Keymaster

    The line numbers you changed seem ok to me.
    You should keep the changed files, but since in fact those lines do a post-submit check that should always be ok (unless someone hacks the form), it doesn’t matter.
    If you are unsure, you can always download the latest development version from the wordpress site too.

    #55074
    Franky
    Keymaster

    The line numbers you changed seem ok to me.
    You should keep the changed files, but since in fact those lines do a post-submit check that should always be ok (unless someone hacks the form), it doesn’t matter.
    If you are unsure, you can always download the latest development version from the wordpress site too.

    #55075
    Anonymous
    Inactive

    Thanks a lot! Updated to current developer version and it looks very promising! It denies booking if i try do book without choosing a seat and it denies booking, if i try to book more than one seat.

    If there are no side-effects, this is exactly what i wanted!

    Great work, awesome support. Thank you again!

    Werner.

Viewing 19 posts - 1 through 19 (of 19 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top