Events Made Easy Forums How do I … Multibooking Confusion [eme_add_multibooking_form]

Tagged: ,

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #63750
    Anonymous
    Inactive

    Hi Franky, I’ve been trying and reading and re-reading the doc concerning the [eme_add_multibooking_form] shortcode, and I just can’t seem to get it to work.

    What I try to achieve: Show a dropdown of selected events where people can select the one which they like to book a seat for.

    From what I gather from the documentation, the parameter “only_one=1” should do exactly this, right?
    “if value=1 (the default is 0) this will cause a dropdown of the matching events to show, and not a select-box list. The parameter template_id is ignored in this case.”

    But nothing changes – my page looks exactly the same, with “only_one=1” or without.
    This is my test page with just 2 events: https://now2022.andreasdirscherl.de/multibooking-test/
    I also tried changing min and max seats to 1 but then only the seats dropdown correctly disappears, and the whole event list becomes just that – a list with no way to select anything?

    Is there a RSVP setting in the events and/or the general EME RSVP I’m missing?

    Also – I noticed that when I use the required placeholders in the header #_LASTNAME and #_EMAIL they are editable on the page. Whereas when used in a regular single [eme_add_bboking_form] these fields are not editable. More confusion.
    What am I not understanding?

    Can you help me out?
    Thanks! A.

    #63751
    Franky
    Keymaster

    I still have access to your test setup so I’ll take a look ๐Ÿ™‚

    #63752
    Franky
    Keymaster

    it is only_one_event, I need to update the doc there (because I also added only_one_seat)
    I changed it at your end, but you need to check your output now.
    Also: maybe check the new eme_add_simple_multibooking_form ==> no need to change your templates per event then etc …

    #63753
    Franky
    Keymaster

    I corrected your templates/setup and also the doc on the EME website.

    #63757
    Anonymous
    Inactive

    Very nice, thank you – especially for directly updating the shortcode on my site. Great.

    Could you also say something about my other question about the required fields #_FIRSTNAME, #_LASTNAME and #_EMAIL being editable when logged in on the multibooking form (when they are not on the regular/single booking form)?

    And about your tip for the new eme_add_simple_multibooking_form. I’d already tried that before, too, but it didn’t work for me. Probably because of the updated only_one_seat, only_one_event parameters?
    So I gave it another spin, and now EME throws a fatal PHP error as soon as I add the ‘only_one_event’ parameter. ‘only_one_seat’ works fine, though.

    This is the php.log:
    [27-Jan-2022 16:12:18 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function eme_ui_radio(), 2 passed in /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_rsvp.php on line 190 and at least 3 expected in /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_UI_helpers.php:372
    Stack trace:
    #0 /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_rsvp.php(190): eme_ui_radio()
    #1 /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_rsvp.php(286): eme_add_multibooking_form()
    #2 /usr/www/users/andreaxk/now2022/wp-includes/shortcodes.php(356): eme_add_multibooking_form_shortcode()
    #3 [internal function]: do_shortcode_tag()
    #4 /usr/www/users/andreaxk/now2022/wp-includes/shortcodes.php(228): preg_replace_callback()
    #5 /usr/www/users/andreaxk/now2022/wp-includes/class-wp-hook.php(307): do_shortcode()
    #6 /usr/www/users/andreaxk/now2022/wp-includes/plugin.php(189): WP_Hook->apply_filters()
    #7 /usr/www/users/andreaxk/now2022/wp-content/themes/Divi/epanel/custom_functions.php(501): apply_filters()
    #8 /usr/www/users/andreaxk/now2022/wp-content/themes/Divi/epanel/custom_functions.php(544): et_first_image()
    #9 /usr/www/users/andreaxk/now2022/wp-content/themes/Divi/page.php(35): get_thumbnail()
    #10 /usr/www/users/andreaxk/now2022/wp-includes/template-loader.php(106): include(‘/usr/www/users/…’)
    #11 /usr/www/users/andreaxk/now2022/wp-blog-header.php(19): require_once(‘/usr/www/users/…’)
    #12 /usr/www/users/andreaxk/now2022/index.php(17): require(‘/usr/www/users/…’)
    #13 {main}
    thrown in /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_UI_helpers.php on line 372

    #63760
    Franky
    Keymaster

    The readonly was not implemented for multibooking, I implemented it now in dev.
    Concerning the php error: should be fixed your site.

    #63761
    Anonymous
    Inactive

    Awesome. Great job. The multibooking form is working now perfectly. Thank you!

    But I’m afraid I still have to bother you (sorry!)

    Now that I’m able to do actually submit the booking there’s another issue
    With the option simple=1 I get “An error has occurred”
    When using the default (simple=0) I get an empty <div id=”eme-rsvp-addmessage-error-61f30c90d9db5″> with no text inside whatsoever.

    Also, when I use the category_id parameter instead of ‘id=’ EME throws a PHP warning (twice, in fact):

    “Warning: Undefined variable $eme_timezone in /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_categories.php on line 350

    Warning: Undefined variable $eme_timezone in /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_categories.php on line 350”

    #63762
    Anonymous
    Inactive

    Did find an error in the php.log

    [27-Jan-2022 21:12:18 UTC] PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, string given in /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_functions.php:1551
    Stack trace:
    #0 /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_functions.php(1551): array_filter()
    #1 /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_events.php(4889): eme_array_remove_empty_elements()
    #2 /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_rsvp.php(565): eme_get_event_arr()
    #3 /usr/www/users/andreaxk/now2022/wp-includes/class-wp-hook.php(307): eme_add_bookings_ajax()
    #4 /usr/www/users/andreaxk/now2022/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #5 /usr/www/users/andreaxk/now2022/wp-includes/plugin.php(474): WP_Hook->do_action()
    #6 /usr/www/users/andreaxk/now2022/wp-admin/admin-ajax.php(187): do_action()
    #7 {main}
    thrown in /usr/www/users/andreaxk/now2022/wp-content/plugins/events-made-easy/eme_functions.php on line 1551

    #63763
    Franky
    Keymaster

    Yes, I’m fixing that in dev ๐Ÿ™‚ I think I just fixed that last php error on your site too, and the php warning too.
    I’ll now check the form submit, but can you check on your end what combination is not working?

    #63764
    Anonymous
    Inactive

    Thank you.

    No combination works for me – no booking goes through.
    Like I said, the only difference is that in one case I see an error message on the frontend:

    “With the option simple=1 I get โ€œAn error has occurredโ€
    When using the default (simple=0) I get an empty <div id=โ€eme-rsvp-addmessage-error-61f30c90d9db5โ€ณ> with no text inside whatsoever.”

    #63765
    Franky
    Keymaster

    simple=1 works, simple=0 but only_one_event=1 doesn’t. I’m checking that

    #63766
    Franky
    Keymaster

    Ok, try again now ๐Ÿ™‚

    #63767
    Anonymous
    Inactive

    Yes, sir!

    All good now.

    One last question – when using the category_id parameter, the events are ordered by ID, correct? If I wanted them to be alphabetically I would need to throw in some JavaScript, right?

    Thank you and good night.

    #63768
    Franky
    Keymaster

    That’s indeed currently not possible. I just coded an order-option for the multibooking shortcodes, so if you want to try out the dev-version, feel free ๐Ÿ™‚

    #63777
    Franky
    Keymaster

    Btw, in the dev-version (and the next release) the events (when using category_id) will be sorted by start_date ASC and event_name ASC by default (the same as everywhere else). The order option is also identical as to the one in [eme_events]

    #63780
    Anonymous
    Inactive

    Yeah, I have it flawlessly running on my test site with order=”event_name ASC”.
    Thank you!

Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top