List location in [app_confirmation]

Hi

I have 4 locations and 2 services. I’ve made 8 services altogether (4 of each, linked to the 4 different locations( but with the same description for each.

I want the confirmation app (i.e. NOT the confirmation email) to list the location as well as the service and the service provider. I assume there must be a way to do this – somehow surely I can make another field and chose to display it using the shortcode? Is this possible please? I would have thought something like:

[app_confirmation display:”location”,location] ??

Thanks

  • Ash
    • WordPress Hacker

    Hello @teresa Vance

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    There is no way to list out the location like this. You need to use shortcode to show service list and provider list. [app_confirmation] is the shortcode that process the confirmation of a booked appointment, nothing with the location.

    If you please draw a mockup or screenshot how you want it to look like, we can try to find if there is a way.

    Cheers

    Ash

  • Teresa Vance
    • Site Builder, Child of Zeus

    That would be great @ash. Currently the confirmation box shows:

    Service name: Initial Appointment

    Service Provider: Janice Benning

    Date and time: October 17th, 2:00pm

    Lasts (approx): 90 minutes

    etc.,,,,,

    I would want it to add in the location and show:

    Service name: Initial Appointment

    Service Provider: Janice Benning

    Date and time: October 17th, 2:00pm

    Location: Harley Street

    Lasts (approx): 90 minutes

    etc.,,,,,

  • Ash
    • WordPress Hacker

    Hello @teresa Vance

    I am sorry for the delay. I am off for high fever.

    Though I have taken a look at your issue and it needs to edit the plugin core code. Please follow these:

    Go to /wp-content/plugins/appointments/includes/class_app_shortcodes.php line no 1762 and add these codes:

    $ret .= '<div class="appointments-confirmation-location">';
    $ret .= '</div>';

    and in line 1818:

    $(".appointments-confirmation-location").html(response.location);

    Then go to /wp-content/plugins/appointments/appointments.php line no 1413 and add these:

    $loc_id = App_Locations_ServiceLocations::service_to_location_id($service);
    $loc_obj = App_Locations_Model::get_instance();
    $place_obj = $loc_obj->find_by('id', $loc_id);
    $location = '<label><span>'. __('Location: ', 'appointments' ). '</span>'. $place_obj->get_address() . '</label>';

    And in line 1470:

    'location'	=> $location,

    It should work.

    Please note that, this changes will be lost in next update. So it’s worth to note down this changes somewhere and apply again after your updates.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers

    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.