window.beforeConfirmBookingLoaded = function (reservation, bookable, employee, location) { var totalPrice = !bookable.ticketsData ? reservation.bookings[0].persons * bookable.price : bookable.price; console.log(totalPrice); jQuery(document).ready( function(){ if( isUserLoggedIn == 0 ) { jQuery('.payment-dialog-footer').hide(); jQuery('.am-confirmation-booking-cost').after('