Appointments+ shortcode not working

We talked about this with Victor in the chat and my probelm is that shortcodes doesn't work on this page: http://dropperist.com/listing/mikko-vapa/
but they do on normal pages: http://dropperist.com/test/

Listing pages are being populated by the advanced custom fields and i added the shortcodes inside one. It seems to work like in half. Any help would be awesome :slight_smile:

  • Vladislav
    • Dead Eye Dev

    Hello,

    It appears that the scripts and other aux resources needed for shortcode operation don't get added to the page when the fields are added via Advanced Custom Fields. How are you outputting your ACF field values for directory listings? If you're using something like the_field/get_field function calls in your template, you'll need to also add an additional line of code to your template, like so:

    global $appointments; $appointments->load_scripts_styles();

  • Niko
    • Design Lord, Child of Thor

    This is what i'm using currently.

    <div class="entry-content">
    <div>
    <?php the_field('describe'); ?>
    </div>

    And i would like the fields to work in that specific area. So would the output be like this then?

    <div class="entry-content">
    <div>
    <?php the_field('describe'); ?>
     global $appointments; $appointments->load_scripts_styles();
    </div>
  • Niko
    • Design Lord, Child of Thor

    Hey there,

    I got it working after testing out with this.

    <?php the_field('describe');
    global $appointments; $appointments->load_scripts_styles();
    ?>

    It seems not to be working when testing out thou with the choose a service shortcode. Optimally it would be great to have the service as a dropdown on the appointments field. Could this be possible? It's rather silly that it chooses the worker but you can't choose the service.

    Cheers,
    Niki

  • Jack Kitterhing
    • Code Norris

    Hi there @Niki

    I hope you are well today, I'm glad to hear you got it working that's fantastic! :slight_smile:

    What are you using for the choose a service shortcode with ACF? I spoke with the lead developer of A+ He said that " ACF to update the actual content of the custom post type, not random meta properties"

    For the service as a dropdown, do you have a rough screenshot of what you mean on that? Sorry not 100% sure what you mean, the services should be linked to the workers?

    Thank you!

    Kind Regards
    Jack.

  • Niko
    • Design Lord, Child of Thor

    Hi there @Jack Kitterhing

    I hope you are well today also! :slight_smile: Heh yea i was waiting for a confirmation for awhile and then just edited the files to see if it works witch it did!

    I tried to use the [app_services worker=11] shortcode but it didn't end up giving any information. And honestly it isn't excactly as eye catching solution to use that so if it would be possible to just choose from the dropdown in the end would be awesome. There is only 2 services avail for everyone and they last the same so. And yes the services should be linked to the workers.

    Here is a screenshot about the thoughts. I hope it clarifies abit :slight_smile:

  • Jack Kitterhing
    • Code Norris

    Hi there @Niki

    Thanks for the additional information, I see what you mean now, out of the box I don't believe that is possible to have a dropdown there, as that's once people have choosen their time slot correct?

    I'll flag the lead developer for some clarification on this :slight_smile:

    Thank you!

    Kind Regards
    Jack.

  • Niko
    • Design Lord, Child of Thor

    Hi there @Jack Kitterhing

    Yes that is after people have chose their time slot. I hope this is possible to achieve with the appointments plugin. It's rather weird that it doesn't work like that from the start since it kind of takes the whole point of the monthly calendar away if a customer can't choose a service.

    Cheers,
    Niki

  • Niko
    • Design Lord, Child of Thor

    Hi there @Jack Kitterhing

    On this case it wouldn't be optimal since the plan is to implement the calendar straight to the listing info where that certain persons info already is.

    Like from the user side it should be a no brainer to make an appointment just by arriving to a listing witch has this option enabled. Since a user is already in his/her chosen city and provider user shouldn't have to go to a different page or such at this case.

    I thought this would be possible since Hakan kindly advised with the service provider section earlier.

    Cheers,
    Niki

  • Vladislav
    • Dead Eye Dev

    Hello,

    Unfortunately, it's not possible to have worker selection in the confirmation shortcode output. While I can see how it would make sense in some scenarios, in other scenarios it just wouldn't work for rendering the calendar interface (i.e. without a worker selected, we have a pretty vague idea on which exact slots are available). The worker shortcode attribute, however, should work with the app_services shortcode, and in my tests, it appears to do so properly (with or without quotes around the ID) - granted, I was testing with the shortcode entered in the post content area, so this could also be a part of the ACF conflict issue. Can we please make sure that you do have a worker with this ID? Also, does the shortcode work when entered in something like a regular post content area?

  • Niko
    • Design Lord, Child of Thor

    Hi @Vladislav

    Thanks for the info. The shortcode for the services works with the ACF but the problem is that you have to push the button for the service to change. Customer doesn't know this and just gets frustrated because of the unnecessary step.

    Imo if these 3 shortcodes are implemented at the same time:
    [app_services]
    [app_monthly_schedule worker=11]
    [app_confirmation]

    The schedule and the confirmation should be hidden until you choose the service. This however could be easily avoided by letting the customer choose the time and then adjust the service. At this current stage it seems that [app_monthly_schedule worker=ID] is pretty odd to use.

    In the field under app_monthly_schedule shortcode there is this line that i thought would do the the trick but it doesn't seem to do it.

    service: Enter service ID only if you want to force the table display the service with entered ID. Default: "0" (Service is selected by dropdown). Note: Multiple selections are not allowed.

    Cheers,
    Niki

  • Vladislav
    • Dead Eye Dev

    Hello,

    The [app_services] shortcode also supports the "autorefresh" attribute, that will, if set to "1", suppress the "Show" button and force the page into an automatic refresh to appropriate selection as visitor changes it. The same attribute also exists for the [app_service_providers] shortcode. Is that something that can be used in your scenario?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.