Okay
  Public Ticket #1733198
Booking Wizard Success Redirection
Closed

Comments

  • cruzce started the conversation

    Would like to enable a redirection to another web page once the client has booked a date via the booking wizard. Any help is greatly appreciated. 


    Many thanks!

  • [deleted] replied

    Hi cruzce,
    thank you for the purchase.

    Unfortunately, we don't provide callback method that executes when booking is complete, but I can give you instructions how to alter JS and add that method. The problem is that JS is minified, so it is quite unreadable. Before you do this, backup the JS file.

    The file that needs to be changed is:
    ameliabooking/public/js/chunks/amelia-booking-booking.js

    In that file, you can search for the string:
    showCalendar:function(){

    and add code below:
    if('executeCompleteBooking' in window){window.executeCompleteBooking();};

    So, it should look like this:
    showCalendar:function(){if('executeCompleteBooking' in window){window.executeCompleteBooking();};

    Then you can add method definition with your logic on your page (while in text mode), for example:
    <script> window.executeCompleteBooking = function () {   // your code goes here } </script>
    [ameliabooking]


  • cruzce replied

    Worked flawlessly! Many thanks for your detailed instructions.

    However, I highly recommend that this be built as a feature into the Amelia web application in a future update. Allowing the end-user of the product to enable or disable page redirects, at the end of the booking process, makes it easy to custom tailor this awesome application for their use. 

    Great product; please continue to innovate.

    Cheers!

  • [deleted] replied

    Hi cruzce,

    Thank you for your suggestion, it is a very good idea. We have added this on our To Do list and we will reconsider adding this option for one of the future version. 

    We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link. Thanks! 

    Thank you once again!