Hello Team,
As promised, I will give you feedback on our modifications made.
class-date-time-map.php start line 119
// Round formatted time
$getCurrentHout = $getDateTime->format('h');
$getCurrentMeridiem = $getDateTime->format('a');
$getMinute = $getDateTime->format('i') < 60 ? '15' : '00';
$getCurrentTime = "$getCurrentHout:$getMinute$getCurrentMeridiem";
// Check start time
$setStartTime = $getCurrentTime;
if( strtotime($shopOpeningTime) > strtotime($getCurrentTime) ) {
$setStartTime = $shopOpeningTime;
}
if( !empty( $selectedDate ) ) {
$currentDate = strtotime( $getDateTime->format('d-m-Y') );
$selectedDate = strtotime( $selectedDate );
if( $selectedDate > $currentDate ) {
$setStartTime = $shopOpeningTime;
}
}
// value init
$startTime = $setStartTime;
$endTime = !empty( $shopClosingTime ) ? $shopClosingTime : '';
$MinutesDeff = !empty( $timeSlot[1] ) ? $timeSlot[1] : '15';
// Get start time to end time different
$startTimeStr = strtotime( $startTime );
$endTimeStr = strtotime( $endTime );
$deff = $endTimeStr - $startTimeStr;
$totalHour = date('h', $deff );
if( $MinutesDeff > 60 ) {
$loopTime = $totalHour / $timeSlot[0];
$loopTime = round( $loopTime );
} else {
$loopTime = $totalHour * $timeSlot[0];
}
//
$addMinutes = 60;
$newTime = '';
//
We have also added the possibility of choosing the time slot every 15min
delivertimebranch.php start line 94
$this->selectbox(
[
'title' => esc_html__( 'Delivery Time Slot', 'foodbook' ),
'name' => 'delivery-time-slot',
'options' => [
'4,15' => esc_html__( '15min', 'foodbook' ),
'2,30' => esc_html__( '30min', 'foodbook' ),
'1,60' => esc_html__( '60min', 'foodbook' ),
'2,120' => esc_html__( '120min', 'foodbook' ),
'3,180' => esc_html__( '180min', 'foodbook' )
]
]
);
We are currently in the process of further simplifying our site for our customers. π
We have also completely revised the responsive and design of the product content, the shopping cart …
The only thing that scares me is when you go to update FoodBook, given the number of changes I made I will probably speak Chinese LOL
I hope this will help you.
I won’t hide from you that I had never touched php or javascript before buying FoodBook and frankly, now I love it!
Your plugins are really well designed and the comentary spaces in the code are super well described. Which allows me to understand more easily. Well done to you and your team!
It will be with great pleasure if I can help you improve your plugins π
And sorry for my English which is very bad x)
Thansk u,
Team Sultan Kebab – and me Guillaume