Okay
  Public Ticket #2585376
redirecting after booking
Closed

Comments

  •  2
    Barry started the conversation

    We want people to be redirected after they book without having to click the finish button.

    Is there a workaround or a way to force redirect one they book?

    Thank you

  • [deleted] replied

    Hello Barry,

    There are some JS hooks in Amelia, 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)

     

    So, you can use one of those to achieve what you want. 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. 


  •  2
    Erwan replied

    Hello Marija

    I'm coming on this ticket because i am searching the solution for the same question.
    Your solution is great, but users can't add the appointment into their calendar if we do that.
    Can we  find other solution ? 

    A solution that be great will be : 

    User book the event and the final page appear with the same Button : Add to calendar, and Finish

    The message at the top of the button with the Icon must be : " You have to click on finish button or add to calendar to confirm your appointment"


    Or, give a last step to check the informations that the user give us, and add the same configuration : 

    Label  " You have to click on finish button or add to calendar to confirm your appointment"
    Button : Add to calendar
    Button : Finish


    Do you think it's possible ? 



    Thanks 

  • [deleted] replied

    Hello Erwan, 

    There isn't such possibility in Amelia with its current built-in features, unfortunately. 

    If you redirect customers to another page they lose the last Congratulations Amelia page, so the Add calendar option with it. You can only have this page, with the add to calendar option, and then customers to be redirected to another page when they click on the Finish button, but the view of the page can't be changed with Amelia's current features, unfortunately. 

    You can only change the String Congratulations... if you want  using the translation method of the plugin, so using some translation tool like Poedit or Loco translate to change the sentence that appears on the screen to the sentences that you want there (You have to click on finish button or add to calendar to confirm your appointment")

    We have the Add to calendar option for email notifications in our to-do list for future versions of Amelia, but for now we can't say when it will be implemented and released. 

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

  •  2
    Erwan replied

    Hello Marija
    Thanks for your answer
    Great job !

  • [deleted] replied

    You are welcome, Erwan. 

    Thank you! 

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

  •  1
    Gary Brett replied

    Hi Marija, is it possible to add a 2 second time delay on that?

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

    Thanks

  • [deleted] replied

    Hi GAry, 

    You can try this out or something similar to add a delay on that : 

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


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

  •  1
    Gary Brett replied

    Thankyou, il give it a go

  • [deleted] replied

    You are welcome, Gary. 

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