[app_monthly_schedule worker="1"] or [app_monthly_schedule service="1"}]

Hi,
Can you send me a screen shot on what the above suppose to look like?
We want to have 2 different pages with different services on each page.
Page A will have 3 services and Page B just 1 service (not the same services as Page A)
Is this possible using the service shortcode?

I tried both shortcodes above with worker and service and it didn't look any different with the monthly schedules if I didn't code worker or service.

Thanks

  • Hakan
    • The Incredible Smush

    Hi,

    Attached please find an example for 3 different services' schedules on the same page.

    In this example:
    1. 3 different appointments (10:00, 11:00, 12:00) have been made for 3 different services for 7th of November.
    2. There are 3 providers each serving a single service.
    3. Service provider 3 starts work at 10am, the others at 8am. Service provider 3 also works on sundays.
    4. Services last 60, 30, 150 minutes, respectively.
    5. Please note that for Service 1 as 10:00am is taken and service lasts 60 minutes, 9:30 is not available either.

    The page content in the editor is as follows:

    <table>
    <tbody>
    <tr>
    <td>
    [app_monthly_schedule service="1" title="<h3>Our schedule for Service 1 for START</h3>"]
    </td>
    </tr>
    
    <tr>
    <td>
    [app_monthly_schedule service="2" title="<h3>Our schedule for Service 2 for START</h3>" logged=" "]
    </td>
    </tr>
    
    <tr>
    <td>
    [app_monthly_schedule service="3" title="<h3>Our schedule for Service 3 for START</h3>" logged=" "]
    </td>
    </tr>
    
    <tr>
    <td>
    [app_confirmation]
    </td>
    </tr>
    </tbody>
    </table>

    I hope this helps.

    Cheers,
    Hakan

  • JamesS
    • New Recruit

    Another question, is there a way to only show 3 out of the 4 services on 1 monthly calendar? I don't want that page to show the 4th service (it'll be on its own page)

    Or do i want to have it like above 3 calendars, 1 service on each calendar?

  • Hakan
    • The Incredible Smush

    Hi,

    It is possible to hide a service, provided that it is not the first one in the list.

    Example of hiding service with ID 3 on page with ID 7:

    function hide_service( $script ) {
    global $post;
    $add = '';
    if ( $post->ID == 7 )
    $add = "$('.app_select_services option[value=3]').hide();";
    return $add.$script;
    }
    add_filter( 'app_footer_scripts', 'hide_service');

    Codes will be added to functions.php of the current theme.

    Cheers,
    Hakan

  • Hakan
    • The Incredible Smush

    Hi,

    I meant that code will hide the service 3 selection in the service selection dropdown.

    Obviously you cannot include more than 1 service in a single schedule without a dropdown. How will the user pick the service then?

    If you want to have only one schedule on the page, then you must use a service selection dropdown and optionally you can hide 1 service out of 4 in the dropdown.

    So this page will have [app_services] plus [app_monthly_schedule]. Service 3 will be hidden here by the above codes.

    On the other page you will have [app_monthly_schedule service="3"]

    Cheers,
    hakan

  • Hakan
    • The Incredible Smush

    Hiding services 3 AND 5 for page with ID 7:

    function hide_service( $script ) {
    global $post;
    $add = '';
    if ( $post->ID == 7 ) {
    $add = "$('.app_select_services option[value=3]').hide();";
    $add .= "$('.app_select_services option[value=5]').hide();";
    }
    return $add.$script;
    }
    add_filter( 'app_footer_scripts', 'hide_service');
  • JamesS
    • New Recruit

    I just realized that the above code does not work for browser Safari and IExplorer, it works for Firefox and Google Chrome :slight_frown:

    This is with the version 1.1.8 and 1.2.3

    http://www.sharedsorrows.com/make-an-appointment

    function hide_service( $script ) {
    global $post;
    $add = '';
    if ( $post->ID == 2867 )
    $add = "$('.app_select_services option[value=4]').hide();";
    return $add.$script;
    }
    add_filter( 'app_footer_scripts', 'hide_service');

  • JamesS
    • New Recruit

    I'm assuming there was suppose to be a ";" in 'disabled')"; to disabled');";

    It does disable the service, its not selectable, but any way for it not to show up?

    any way that this shortcode

    [app_services worker=]

    can take more than 1 worker like worker="1,2" so it will shows all services for worker 1 and 2?

  • Hakan
    • The Incredible Smush

    Yes, there should be another ; there. I corrected it.

    It does disable the service, its not selectable, but any way for it not to show up?

    That is the only way we have now as you have noticed hide() is not working in some browsers.

    Multiple worker id selection will not work.

    Cheers,
    Hakan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.