hofercraft
Forum Replies Created
-
Thank you,
then I would like to reformulate my request so that it fits to the free plugin version.
I have now found out that with one of the last updates (with the new e-mail editor) the old already existing e-mail texts lose the line breaks. So it’s not the email designer.
Where do I have to start to solve this problem?
How is it possible to transfer the old texts as part of a plugin update so that they remain correctly formatted?
Unfortunately, manual reformatting is not possible in my case (over 2000 single e-mail texts).
Thomascheck /wp-admin/admin.php?page=rtb-settings
and
/wp-admin/edit.php?post_type=locationI have included that requested setting to my implementation.
It needs adaptions in the..
Settings.class.php to add the setting itself, e.g. “late-bookings-deadline’
“Latest possible reservation acceptance”
– “After this time is reached, reservations for today are no longer possible.”$sap->add_setting( 'rtb-settings', 'rtb-global-settings', 'select', array( 'id' => 'late-bookings-deadline', 'title' => __( 'Latest possible reservation acceptance', 'restaurant-reservations' ), 'description' => __( 'After this time is reached, reservations for today are no longer possible.', 'restaurant-reservations' ), 'blank_option' => false, 'options' => apply_filters( 'rtb_setting_deadline', array( '' => __( 'No restriction', 'restaurant-reservations' ), '05:00' => __( '05:00' ), '05:30' => __( '05:30' ), '06:00' => __( '06:00' ), '06:30' => __( '06:30' ), '07:00' => __( '07:00' ), '07:30' => __( '07:30' ), '08:00' => __( '08:00' ), '08:30' => __( '08:30' ), '09:00' => __( '09:00' ), '09:30' => __( '09:30' ), '10:00' => __( '10:00' ), '10:30' => __( '10:30' ), '11:00' => __( '11:00' ), '11:30' => __( '11:30' ), '12:00' => __( '12:00' ), '12:30' => __( '12:30' ), '13:00' => __( '13:00' ), '13:30' => __( '13:30' ), '14:00' => __( '14:00' ), '14:30' => __( '14:30' ), '15:00' => __( '15:00' ), '15:30' => __( '15:30' ), '16:00' => __( '16:00' ), '16:30' => __( '16:30' ), '17:00' => __( '17:00' ), '17:30' => __( '17:30' ), '18:00' => __( '18:00' ), '18:30' => __( '18:30' ), '19:00' => __( '19:00' ), '19:30' => __( '19:30' ), '20:00' => __( '20:00' ), '20:30' => __( '20:30' ), '21:00' => __( '21:00' ), '21:30' => __( '21:30' ), '22:00' => __( '22:00' ), '22:30' => __( '22:30' ), '23:00' => __( '23:00' ), '23:30' => __( '23:30' ), ) ) ) );
Ajax.class.php to compare setting with the current time -> blend out all times for current day if time is reached
above return $open_time;// Time until which reservations are possible for the current day. $late_bookings_deadline = ( is_admin() && current_user_can( 'manage_bookings' ) ) ? '' : $rtb_controller->settings->get_setting( 'late-bookings-deadline' ); if ( $late_bookings_deadline != '' ) { // only if selected date is == today if ( (new DateTime( 'now', wp_timezone() ) )->format( 'yyyyMMdd' ) == $selected_date->format( 'yyyyMMdd' ) ) { // if current time 20:01 (example current time) > 20:00 (example setting), then blend out all times for current day if ( (new DateTime( 'now', wp_timezone() ) )->format( 'H:i' ) > $late_bookings_deadline ) { $time_calc = ( new DateTime( 'now', wp_timezone() ) )->format( 'U' ) + ( 2400 * 60 ); while ($time_calc > $open_time) { $open_time = $open_time + $interval; } } } }
Booking.Class.php to let print an error “Sorry, last possible booking time for today already reached.”$late_bookings_deadline = $rtb_controller->settings->get_setting( 'late-bookings-deadline' ); if ( empty( $late_bookings_deadline ) ) { if ( $request->format( 'U' ) < $this->date_submission->format( 'U' ) ) { $this->validation_errors[] = array( 'field' => 'time', 'error_msg' => 'late_bookings_deadline', 'message' => __( 'Sorry, last possible booking time for today already reached.', 'restaurant-reservations' ), ); } }
Thank you!
PS:? how did you get the language drop down? That’s another thing I requested back in the days, but I don’t see that on my multi lingual (wpml sites).
John-Pierre Cornelissen?Here we had to customize the plugin ourselves
- create translation possibility in the backend
- save the language of the guest with the frontend guest data (based on browser-,app-,OS-setting or language switch)
- send user emails based on the saved language
We now use the tool with over 200 customers and have also had to adapt it accordingly.
The option (enabled by default!), is only usable if the status is changed and at the same time makes sense.Sorry, I overlooked that this is also a premium feature. I’ll write an email.
the upgrade of the pickadate files (v3.6.1->v3.6.4) really fixed it.
I downgraded it again to show it to you. (Going to replace it again with the newer files next days.)website: bit.ly/3XyPkdP
video clip: bit.ly/3XCz7ElYou see here customized theme and plugin, but with the original and mentioned theme it behaves the same.
Thank you for your efforts!
it seems to be fixed with pickadate.js v3.6.4. I just replaced the files from pickadate.js-master\lib\compressed in \lib\pickadate
source: https://github.com/amsul/pickadate.jsUpdate: works in Firefox, so far only problem in Chrome (also incognito)
Yes, the renaming of the labels. I was not (more) aware that it is not part of the free plugin. Therefore we can leave it here with my one-sided message ??
Hi, I haven’t yet had a closer look myself how to make it work. As I understand it is requested to have an calendar import that itself fetches all up to date bookings.
1. auto export bookings (cronjob?) to a format that fits, probably better ics file format?
2. provide it via some weblink to make it possible to subscribe and receive automatic updates for all upcoming bookings / let refresh the imported bookings automatically“website puts up a calendar feed (basically a .ics text/calendar file possibly produced in real time from latest data, no caching). ”
..
“Subscribing applications will check for any updates as and when suits them, as defined by their own algorithms. They parse the .ics file and process the RFC5545 event definitions and update their systems accordingly.”Thanks
thanks, I’m going to send you an email with link and login data soon.
I found out it happens if Enable Maximums is active. There is no other plugin active, also tested with other active theme.
update 2:
while testing my solution, I can say it works so far but found some bug:
the language of the summary mail random differs from mail to mail..
sometimes in use: language from logged in admin
other times in use: language from frontend is in useThere should be some fixed setting to make sure in what language the admin user receives this summary email ??