A+ change verbiage on confirmation popup window and choose page after clicking ok

Hello,

Is there a way to change the verbiage on the popup confirmation window. Currently it says:

"We have received your appointment. Thanks!"

I would like to change it to say:

"We have received your appointment. Thanks! A confirmation email will be mailed to you shortly."

Additionally, is there a way to choose/change which page hitting the 'OK' button directs you to? currently, it just refreshes the booking page. I would like it to take a person to another page on the site.

[attachments are only viewable by logged-in members]

  • Ash
    • Code Norris

    Hello @dcayme1

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

    Both are possible by making some changes in the plugin code. Though the changes will be lost when you will update the plugin. So, you need to make this changes every time you update.

    Please let me know if you are open to do this, I will give you the changes.

    Cheers

    Ash

  • Ash
    • Code Norris

    Hello @dcayme1

    I hope you are well today.

    To change reload location, please go to /wp-content/plugins/appointments/js/js-check.js in line no 38 and replace:

    return loc;

    to

    return "YOUR DESIRED URL";

    To change the thank you text, please go to /wp-content/plugins/appointments/includes/class_app_shortcodes.php line no 1642 and change the text.

    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

  • dcayme1
    • Site Builder, Child of Zeus

    Ashok,

    i tried replacing

    return loc;

    with

    return “http://nawatmassagetherapy.com/cancellation/”;

    However, when i tested it did not work. it was actually on line 75 on mine

    Partial code before that to confirm it is the correct location is:

    // Remove # from url so that page can be refreshed

    // Remove # from url so that page can be refreshed

    function app_location() {

    var loc = window.location.href;

    index = loc.indexOf("#");

    if (index > 0) {

    loc = loc.substring(0, index);

    }

    return "http://nawatmassagetherapy.com/cancellation/";

    }

    The other mod worked :slight_smile:

  • dcayme1
    • Site Builder, Child of Zeus

    Ashok,

    it appears my browser wasn’t refreshing properly. the code works perfectly. thanks. Another issue now however. I have a multi-site both with A+. Now both sites go to the same link. Is there a way to make it so that one site goes to one page and another site goes to another page? ie:

    chairmassage.nawatmassagetherapy.com goes to page A

    nawatmassagetherapy.com goes to page B

    Let me know if there is a way to modify the code to distinguish between the two sites.

    Thanks

    -Dom

  • Ash
    • Code Norris

    Hello @dcayme1

    Yes, possible :slight_smile:

    For that, please go to /wp-content/appointments/appointments.php line no 4078 and replace:

    wp_localize_script( 'app-js-check', '_appointments_data',
    array(
    'ajax_url' => admin_url('admin-ajax.php'),
    'root_url' => plugins_url('appointments/images/')
    )
    );

    with

    wp_localize_script( 'app-js-check', '_appointments_data',
    array(
    'ajax_url' => admin_url('admin-ajax.php'),
    'root_url' => plugins_url('appointments/images/'),
    'site_url' => site_url()
    )
    );

    And then in js-check.js replace

    return loc;

    with

    return _appointments_data.site_url + '/cancellation';

    Please note that, in all site the page slug should be “cancellation”.

    Line no can mismatch due to your ftp client, you need to search for

    function load_scripts_styles

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

    Cheers

    Ash