Okay
  Public Ticket #2742074
NEGATIVE minimum advance scheduling time
Closed

Comments

  • Leonidas Touroutoglou started the conversation

    Hello,

    my client asks to let an available time slot  (that is 1h long) open until 20 minutes AFTER the service has started so a "late" customer can book it even after the service has started.

    I understand that this is not an option by default but can you provide some guidance as to how I can achieve that with custom code?

    thanx in advance!

  • [deleted] replied

    Hi, Leonidas!

    Thank you for choosing Amelia.

    That's correct: there's no such a built-in option, so it probably can be achieved with some custom work.

    I will forward your inquiry to our developers to see if it can be done with a simple code, and get back to you at the earliest possible time. 

    Best Regards. 

  • Leonidas Touroutoglou replied

    Thank you so much, I 'll be waiting.

  • [deleted] replied

    Hi, Leonidas!

    Our developers suggest you to try this change:
    src/Domain/Services/TimeSlot/TimeSlotService.php 

    IF condition should look like this:

    if ($currentDateString === $dateKey && ($currentTimeStringInSeconds - 20 * 60 > $appointmentData['seconds'] || $startTimeInSeconds - 20 * 60 > $appointmentData['seconds'])) {
                            continue;
                        }

    0LhF9vqzuex6WoThdaG4uoP39wQsEd72Miia8ECqs95BsdjmAzhKD69lyc0SG_lzVZQ2bYtiX3r3KSXD3kjnJI38UftvRVGbeE9gDyrq4497DF-ul6pGtcmYM2oufvohFpOPA6oY

    Please let us know if that worked.

    Best Regards.