• Resolved timb111

    (@timb111)


    I’ve been using EME on a website to organise trips once per week to many different destinations and it worked great.

    Now I need to change that, and want to offer small group trips to a few fixed destinations.

    So now, instead of having a list of events by date, I need to show a list of destinations and allow people to choose a date to book.

    How can I do this with EME?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Franky

    (@liedekef)

    Use [eme_location] (with the id-option to indicate the location of choice) on a page (or [eme_locations]).
    Then inside the single location format, use [eme_events] with the option location_id. An example is given at the bottom here:
    https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-3-locations/

    Thread Starter timb111

    (@timb111)

    That’s great, so now I can link to a location page and it shows a list of events, one per day. The only issue is that I want to set up the daily tours to run from today until the end of the year, but it just shows a long list of events/dates. Is there some way to allow a visitor to select a date from a date picker and then take them to the event for that date to book?

    I see that going to the URL https://mysite.co.uk/events/2020-08-29/ goes to a page that shows all events on that date. I’m wondering if I could use a JavaScript date picker that goes to the selected date by adjusting the URL. But is there a way to filter the list by location ID from the URL? Or by category ID, as I’m wondering if using categories for each tour might be better if I have 2 different tours in the same town.

    • This reply was modified 3 years, 8 months ago by timb111.
    • This reply was modified 3 years, 8 months ago by timb111.
    Plugin Author Franky

    (@liedekef)

    Well, then I’d suggest to take a look at [eme_filterform] in combination with [eme_events] (or [eme_locations]. See
    https://www.e-dynamics.be/wordpress/category/documentation/6-shortcodes/eme_filterform/
    An example on how I use that: https://wintersportgids.be/materiaal/store-locator/

    Anything else I can’t offer 🙂

    Thread Starter timb111

    (@timb111)

    Thanks Franky, using what you suggested I’ve figured out how to make this work. I insert the events shortcode in a page and use templates:
    [eme_events category=1 template_id=1 template_id_header=2 template_id_footer=3]

    This outputs a dropdown selection list of available (event) dates:

    <select id="selectbox" name="">
    <option value="https://mysite.co.uk/events/test-event/">August 28, 2020</option>
    <option value="https://mysite.co.uk/events/test-event-2/">August 29, 2020</option>
    <option value="https://mysite.co.uk/events/test-event-3/">August 30, 2020</option>
    <option value="https://mysite.co.uk/events/test-event-4/">August 31, 2020</option>
    <option value="https://mysite.co.uk/events/test-event-5/">September 1, 2020</option>
    <option value="https://mysite.co.uk/events/test-event-6/">September 2, 2020</option>
    <input type="submit" onclick="javascript:location.href = this.value;">
    </select>

    It’s not a classic date picker but it’s still more user-friendly than a long list of event links. The only problem is that the generated HTML code is displayed literally and not treated as HTML because the tag characters are escaped:
    & lt; select id=”selectbox” name=”” & gt;

    (I’ve added spaces between & and lt; because this page keeps rendering it.)

    Am I doing something wrong or is this a bug?

    • This reply was modified 3 years, 8 months ago by timb111.
    • This reply was modified 3 years, 8 months ago by timb111.
    • This reply was modified 3 years, 8 months ago by timb111.
    Plugin Author Franky

    (@liedekef)

    Make sure you entered the html in the plain text editor part when editing a template. If you enter that in the html part, then it will get rendered as is.
    The eme_filterform does have a date picker though …

    Thread Starter timb111

    (@timb111)

    In the templates, when I switch to the plain text editor then it removes all tags completely when I save the template. So this header template becomes blank as soon as it’s saved.
    <select id="selectbox" name="">
    And this main template gets turned into just the placeholder “#_STARTDATE”.
    <option value="#_EVENTPAGEURL">#_STARTDATE</option>
    Why is this happening and what can I do to fix this?

    On the eme_filterform, I don’t see a date picker (like tours have on TripAdvisor) but it does give a dropdown list of months to filter the events list which is still helpful.

    I found that the eme_calendar is more what I need as it looks and behaves more like what people would expect when booking tours. I think there might be a bug though. When I use the shortcode and restrict it by location ID, some date links go to the event page (which is what I want) but some date links go to the location page and show a list of all events in that location.

    So on the calendar if I click on a date link, the URL is: https://mysite.co.uk/events/2020-09-02/?location_id=4 . On that date there is one event in location ID 4 and one event in location ID 2. The URL is clearly requesting the only event on 2nd September in location ID 4 and should go to the event page, but instead it just shows the location map and list of all events in location ID 4, exactly the same as displaying the shortcode [eme_location id=4] .

    The calendar date links also behave in an inconsistent way when restricting the calendar by category_id, one date goes to the event page, another date goes to a list of all events on the selected date (ignoring category). Can you please check if these are bugs? Thanks

    • This reply was modified 3 years, 7 months ago by timb111.
    Plugin Author Franky

    (@liedekef)

    There were some bugs in this. This changeset should fix it:
    https://plugins.trac.wordpress.org/changeset/2371589/

    Also, please be aware of the option “show single event” in the EME options, tab “Calendar”.

    Thread Starter timb111

    (@timb111)

    That’s great, thank you for the update.

    And yes I’ve left the “show single event” setting as “yes”.

    What can I do about the templates stripping out the HTML tags?

    Plugin Author Franky

    (@liedekef)

    EME follows the wordpress rules on html in posts, meaning in your case probably a number of html tags are stripped. EME can help you allowing more tags though, see the setting “Extra html tags” in the EME options, tab “Other”

    Thread Starter timb111

    (@timb111)

    Brilliant, it works!

    Thank you Franky, enjoy your weekend.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Changing from individual events to daily events’ is closed to new replies.