Okay
  Public Ticket #2409335
Jump directly to thank you page after appointment booking
Closed

Comments

  •  7
    Helmut started the conversation

    Hi,
    i have added a custom thank you page - is it possible to jump over the gratulations form after booking an appointment. only at free appointments because paid appointments redirect to the woocommerce cart site.
    We want to immediatly jump to the appointment thank you page without add to calendar or congratulation.
    Kind regards, Daniel

  • [deleted] replied


    Hello Daniel, 

    We have some JS hooks, that are triggered depending on the view:

    window.beforeAddToCalendarLoaded()
    window.beforeBookingLoaded()
    window.beforeSearchLoaded()
    window.beforeSearchFiltered()
    window.afterSearchFiltered()
    window.beforeConfirmedBooking()
    window.beforeCatalogLoaded()
    window.afterSelectCatalogCategory(object_category)
    window.beforeCatalogCategoryLoaded(object_category)
    window.beforeCatalogServiceLoaded(object_category, object_service)
    window.afterSearchActivateService(object_appointment, object_serviceActive)
    window.afterSearchGoToSecondStep(object_appointment, object_serviceActive)
    window.afterBookingSelectDateAndTime(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.afterBookingSelectService(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.beforeConfirmBookingLoaded(object_appointment, object_service, object_provider, object_location)
    window.afterConfirmBooking(object_appointment, object_service, object_provider, object_location)

     

    You can use the hook, for example, beforeConfirmedBooking, that will be triggered when your customers confirm booking. You will of course set the redirect URL that you want in the script:

    <script>
    window.beforeConfirmedBooking = function()
    {
    window.location.href = "https://www.google.com";
    };
    </script>

    And you need to just place this script on the page where you have your Amelia shortode. 

    Hope this helps!

    In Amelia, if WooCommerce is enabled every booking process goes to the WooCommerce cart/checkout pages. So, if you want to set the payment method to be on-site if price of service is 0 in Amelia you can achieve that by editing one table in the database. If you need that, of course.

    When you go to your database you need to find and open the wp-options table (it can have different prefix depending on your database) , and find the option amelia_settings in it. Then please edit this option and when you find property 'wc:' there you need to set true for the 'onSiteIfFree' parameter instead of false, like here: 

     "wc": {        "onSiteIfFree": true,
    }


    Let me know if this helped!

  •  7
    Helmut replied

    Thanks that worked for me.
    Kind regards, Daniel

  • [deleted] replied

    You are welcome, Daniel. Glad to see that. 

    If you have any other questions or issues feel free to open a new ticket and we will gladly help.