• Hello
    My client has problem with the plugin.

    She’s the owner and she recently hired assistant. We setup booking, added assistant, but whenever someone books the same date, same time – it getting overlapped by it. There is only 1 calendar system available for 2 workers.

    We would like to have parallel booking so someone can book service at 1:30pm for first assistant and someone can book another service same time for the owner.

    Is this possible?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dimitri Grassi

    (@wordpresschef)

    Hi,

    you need to increase the “customers per session” settings and the “units per session” at service settings level.

    Hope it’s clear.

    Thread Starter Igor

    (@igor92)

    Hello
    Thank you for the fast reply, however I did this and customers per sessions were 2 and units per session 2 and same thing – overlapping.

    Plugin Author Dimitri Grassi

    (@wordpresschef)

    Hi,

    what do you mean with “overlapping” ? Could you make a real example?

    My client also had this problem, and I changed a few lines of code to make it work.

    Example of problem:
    ——————————
    – 2 assistants, each available for multiple different services.
    – Assistant #1 has booking for “hair cut” at 1:00pm on Sept 24 2022
    – Assistant #2 is not available for any service in the 1:00pm time slot on Sept 24 2022
    – ‘customers per session’ makes no difference to this example

    Here is my fix, one line is specific to our usage with the time offset. Adjust as needed.

    --- wp-content/plugins/salon-booking-plugin/src/SLN/Action/Ajax/CheckDateAlt.php	Tue Sep  6 02:32:28 2022
    +++ wp-content/plugins/salon-booking-plugin/src/SLN/Action/Ajax/CheckDateAlt.php	Fri Sep 16 22:42:04 2022
    @@ -238,9 +238,8 @@
                 $attendantErrors = array();
     
                 if ($bookingServices->isLast($bookingService) && $bookingOffsetEnabled) {
    -                $offsetStart   = $bookingService->getEndsAt();
    -                $offsetEnd     = $bookingService->getEndsAt()->modify('+'.$bookingOffset.' minutes');
    -                $serviceErrors = $ah->validateTimePeriod($offsetStart, $offsetEnd);
    +                $offsetEnd   = $bookingService->getEndsAt()->modify('+' . ($bookingOffset - 15) . ' minutes');
    +                $serviceErrors = $ah->validateAttendant($bookingService->getAttendant(), $offsetEnd, null, $bookingService->getBreakStartsAt(), $bookingService->getBreakEndsAt());
                 }
                 if (empty($serviceErrors)) {
                     $serviceErrors = $ah->validateBookingService($bookingService, $bookingServices->isLast($bookingService));
    --- wp-content/plugins/salon-booking-plugin/src/SLN/Helper/Availability.php	Tue Sep  6 02:32:28 2022
    +++ wp-content/plugins/salon-booking-plugin/src/SLN/Helper/Availability.php	Fri Sep 16 22:32:53 2022
    @@ -936,12 +936,7 @@
     
         public function isValidOnlyTime($date)
         {
    -        $countHour = $this->settings->get('parallels_hour');
    -
    -        return ($date >= $this->initialDate) && !($countHour && $this->getBookingsHourCount(
    -                $date->format('H'),
    -                $date->format('i')
    -            ) >= $countHour);
    +        return ($date >= $this->initialDate);
         }
     
         public function getFreeMinutes($date)
    --- wp-content/plugins/salon-booking-plugin/src/SLN/Helper/Availability/Advanced/DayBookings.php	Tue Sep  6 02:32:28 2022
    +++ wp-content/plugins/salon-booking-plugin/src/SLN/Helper/Availability/Advanced/DayBookings.php	Fri Sep 16 22:38:57 2022
    @@ -39,10 +39,17 @@
             foreach ($bookings as $booking) {
                 $bookingServices = $booking->getBookingServices();
                 foreach ($bookingServices->getItems() as $bookingService) {
    +                
    +                $offsetEnd = clone $booking->getEndsAt();
    +                
    +                if ($bookingServices->isLast($bookingService) && $bookingOffsetEnabled) {
    +                    $offsetEnd->modify('+'.$bookingOffset.' minutes');
    +                }
    +                
                     $times = SLN_Func::filterTimes(
                         $this->minutesIntervals,
    -                    $bookingService->getStartsAt(),
    -                    $bookingService->getEndsAt()
    +                    $booking->getStartsAt(),
    +                    $offsetEnd
                     );
                     foreach ($times as $time) {
                         $time = $time->format('H:i');
    Thread Starter Igor

    (@igor92)

    HEy @mithrildesign
    Can you please tell me where this code goes?

    Thank You

    Thread Starter Igor

    (@igor92)

    Dear authors,
    Like @mithrildesign explained, my client has same problem with booking.

    – 2 assistants, each available for multiple different services.
    – Assistant #1 has booking for “hair cut” at 1:00pm on Sept 24 2022
    – Assistant #2 is not available for any service in the 1:00pm time slot on Sept 24 2022

    Even though I set it up like you instructed, still bookings are overlapping, and system treat new booking like it belongs only to one assistant.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Seperate bookings for 2 assistants’ is closed to new replies.