Notice: ABPro's Stripe payment processor uses the Legacy Checkout and is not SCA compatible. read more..

  • Home
  • How-To
  • Have Staff booking not limited by lead time

How-To

Have Staff booking not limited by lead time

If you allow same day bookings, you may wish to have your front desk not be limited by the same lead time constraint you apply for the public. An example would be if you have a walk-in and wish to enter an immediate booking but you set the ABPro lead time to 2 hours for the public.

There are two things that need to be changed:

  1. The server call, to validate the screen, needs to be modified to tell the server what screen you are on (front desk vs public)
  2. The validation for lead time needs to be modified to not block the front desk operator.

#EDIT#
This may be redundant as the 3.0.5 setting 'Staff booking in the past' will accomplish the same thing if set to 1.
#EDIT# 

Item 1

Edit file \components\com_rsappt_pro2\script.js

Around line 685 look for:

data = data + "&phone=" + encodeURIComponent(document.getElementById("phone").value);
data = data + "&email=" + encodeURIComponent(document.getElementById("email").value);

Add the red code line.

data = data + "&phone=" + encodeURIComponent(document.getElementById("phone").value);
data = data + "&email=" + encodeURIComponent(document.getElementById("email").value);
data = data + "&scrn=" + document.getElementById("screen_type").value;

(note, the above line will be added to the stock ABPro in version 2.0.4)

 

Item 2

Edit file \components\com_rsappt_pro2\fe_val.php

Around line 183 look for:

if($appointment_start <= $first_allowable_start) {
// start time of booking is in the past or not far enough in the furture

Add red code:

$screen_type = JRequest::getVar('scrn');
if($appointment_start <= $first_allowable_start && $screen_type != "fd_gad") {
// start time of booking is in the past or not far enough in the furture