Appointments+, multiple emails, default in username, ICal

Hello

I have my site working great and I just want to tweak some things

1) When booking an appointment, it defaults the wordpress username into the Name field. I want it to be FirstName LastName format.

2) I have created four additional fields when signing up for an appointment

Partner's Name
Partner's Email
Third Person Name
Third Person Email

I would like the name fields to be dropdown lists of registered users on the site. I need to know if this is possible where I would make the modification.

I also want confirmation and reminders to go to the Partner Email and Third Person email as well.

3) I want to be able to provide an ical feed to a user to be able to subscribe to a calendar, but I only want events if a certain string is in the description of the event. Do you know how I would be able to do that? The appointments are going to the Google calendar OK, I just want a user to be able to receive a subset of them in their own calendar automatically.

Please advise. Thank you!

Stephen

  • Vinod Dalvi

    Hi @Stephen,

    Welcome to the WPMU Dev community and thank you for your question.

    1) When booking an appointment, it defaults the wordpress username into the Name field. I want it to be FirstName LastName format.

    To achieve this try editing the following Appointments + plugin file on line number 1728 as displayed below.

    Appointments + plugin file :
    appointments\includes\class_app_shortcodes.php

    Before Editing:
    else if ( $user_info->display_name )

    After Editing:

    else if ( $user_info->first_name && $user_info->last_name )
    	$n = $user_info->first_name. ' ' . $user_info->last_name;
    else if ( $user_info->display_name )

    Note: You are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these again after plugin updation.

    2) I have created four additional fields when signing up for an appointment

    Partner's Name
    Partner's Email
    Third Person Name
    Third Person Email

    I would like the name fields to be dropdown lists of registered users on the site. I need to know if this is possible where I would make the modification.

    I also want confirmation and reminders to go to the Partner Email and Third Person email as well

    You will have to develop custom code to achieve this.

    3) I want to be able to provide an ical feed to a user to be able to subscribe to a calendar, but I only want events if a certain string is in the description of the event. Do you know how I would be able to do that? The appointments are going to the Google calendar OK, I just want a user to be able to receive a subset of them in their own calendar automatically.

    Could you please explain it a bit more in detail so that i can help you to achieve it?

    Kind Regards,
    Vinod Dalvi

  • Stephen

    1) great, thanks :slight_smile:

    2) if I wanted to write my code to create a dropdown in the confirmation window, where would I start. Is like to have a go on my own.

    Also..what about just having my two extra emails fields receive confirmations and reminders. Is that possible? I don't know php well but I can get by.

    3) imagine I have one calendar for my company. People book appointments all the time. Imagine I have several VIP customer.ms. I get repeat business from them all the time. I want that he does not need to click anything manually each time to make his appointments appear in his calendar. I want to provide him a link so he can get only his appointments automatically popping up in his calendar. Basically I want the contents of 'my appointments' to get to his calendar without intervention. A friend does something similar. He has a link the customer clicks to add appointments to his cakendar. It subscribes him to a webcal ics feed which just has HIS appointments. Can I get the same result?

    If not, is there a way to create posts when an appointment is confirmed. There is a plugin that will do what I want but it is based on Wordpress posts.

    Thanks :slight_smile:

  • Jack Kitterhing

    Hi there @Stephen,

    Hope you're well today and thanks for your question! :slight_smile:

    2) Appointments+ does include multiple hooks and filters you can use to modify the plugin, some that might come in useful for modifying the confirmation message are

    // Front end ajax hooks
    		add_action( 'wp_ajax_pre_confirmation', array( &$this, 'pre_confirmation' ) ); 			// Get pre_confirmation results
    		add_action( 'wp_ajax_nopriv_pre_confirmation', array( &$this, 'pre_confirmation' ) ); 	// Get pre_confirmation results
    		add_action( 'wp_ajax_post_confirmation', array( &$this, 'post_confirmation' ) ); 		// Do after final confirmation
    		add_action( 'wp_ajax_nopriv_post_confirmation', array( &$this, 'post_confirmation' ) ); // Do after final confirmation

    For example you could hook into that last action and then execute your code after that, but this is going to take quite a lot of custom development.

    3) There's nothing that would do this out of the box currently, though there may be a action similar to above which we could use to trigger a appointment booking on click, or we could provide a direct link to a specific service providers details for them to book, if that would work?

    Thank you!

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.