Hi Kris,
If you want to make possible that client can select multiple time slots in single booking, then there is way:
First don’t change radio box into check boxes.
Add new text field labeled by: End Time:
on Second Modal Window(second dialog window)
End Time: <input type="text" name="start_time" id="start_time">
Allows user to choose/put It’s desired end time in End Time
field.
Then post the End Time
value in appointment saving code and assign It in $end_time
variable.
//save appointment and email admin & client/customer
if( isset($_POST['Client_Name']) && isset($_POST['Client_Email']) ) {
...
$end_time = date( 'h:i A', strtotime( $_POST['start_time']) );
...
}
And you done.
Thanks
Frank
Thanks for the very quick reply, Frank! Greatly appreciated.
I have a problem though, in that I am not sure where I should make these changes? Which .php file(s) should I edit for the Second Modal Window? Or for the appointment saving code? (data_save?).
There are a lot of different .php files and I can not easily tell what they are all for. Please provide the specifics for where exactly to change these values.
Thanks in advance
Kris
You can find & edit above code in appointment-calendar-shortcode.php
file in plugin dir.
Thanks
Hi Frank
Sorry again, for being annoying and asking the same question.
Finding where to assign the end time variable was not hard, but I have no idea where to add this: End Time: <input type=”text” name=”start_time” id=”start_time”>
Cannot find where the field values for the modal are.
Krish
Hi Krish,
Add above field at second modal window.
Second modal window code in file appointment-calendar-shortcode.php
after time slots.
End Time: <input type="text" name="end_time" id="end_time">
Thanks & Happy Holidays
Frank
Thanks so much, Frank! Happy New Year to you!
Could you please tell me if this is correct (where I placed the code), and that is my final request! 🙂
<div class=”apcal_modal-body”>
<div id=”timesloatbox” class=”apcal_alert apcal_alert-block” style=”float:left; height:auto; width:90%;”>
<!—slots time calulation—>
<?php
# time-slots calculation
global $wpdb;
$ServiceId = $_GET[“ServiceId”];
$ServiceTableName = $wpdb->prefix.”ap_services”;
$FindService_sql = “SELECT name
, duration
FROM $ServiceTableName
WHERE id
= ‘$ServiceId'”;
$ServiceData = $wpdb->get_row($FindService_sql, OBJECT);
$ServiceDuration = $ServiceData->duration;
End Time: <input type=”text” name=”end_time” id=”end_time”>
$AppointmentDate = date(“Y-m-d”, strtotime($_GET[‘AppDate’])); //assign selected date by user
Hi Testfab,
Yes, you are right.
Check this image for more help.
Thanks
Frank