bookingalgorithms
Forum Replies Created
-
Forum: Plugins
In reply to: [BA Book Everything] Can i order multiple bookingsHello,
The BA Book Everything plugin doesn’t support multiple items in one reservation, sorry.
—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Problem English translationHello,
It looks like not all things have been translated correctly.
There are some points with WPML plugin you need to pay attention to:
1. The BA Settings should be specified for each language.
So, you have to start from translating general pages, and then setup options in the BA Settings menu.
2. Before translating the booking object posts, you need first to translate all taxonomy terms and other posts like services, fees, places, etc.
Then you have to update translated booking categories and check in their options required taxonomies and other things.
And then you are able to translate booking object posts.For details on the translation process, please, follow the official WPML documentation.
—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Fixed Price in tourHello,
From the BA Book Everything version 1.4.23 the tour booking is available also in “object” booking mode.
With such a booking rule the tour price will be applied to the bus.
You just need to create a new booking rule or edit existent to set “object” booking mode and then use this rule in your booking category for bus.—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Multilingual SupportHello,
Yes, the BA Book Everything plugin supports WPML
—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Connection to Booking.com and airBnBHello,
The iCal synchronization for BA Book Everything plugin is implemented in our BABE Backoffice add-on.
—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Add Two custom field in checkout fieldHello,
From the version 1.4.20 you can use option “Add billing address fields to the checkout form” in the BA Settings > Order menu.
Also you can try to add custom code from this topic and ask the theme authors for more help.—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Tours in 2022 are not ordered by monthsHello,
It looks like you are using [all-items] shortcode to output items on the page. This shortcode supports argument “sort” with possible values: price_from, rating, post_title, av_date_from.
So, to output items sortred by first available date you can use it like [all-items sort=”av_date_from” sortby=”ASC”]—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Conflict with Google Map APIHello,
This option in BA Settings is enough, please, use the latest version of BA Book Everything.
In any case, you can also dequeue the script “babe-google-api” from your code if needed.—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] search formHello,
There are many ways to do this, but they all involve customizing the code in your child theme. So you need to be familiar with PHP and read the BA Book Everything plugin code to find appropriate hooks.
As a starting point you can use the next example.
BA Book Everything contains ‘places’ post type with address field, longitude and latitude data.
They may be cities, streets, or anything else you like.
And it’s possible to add ‘places’ posts as a dropdown select field to the search form.
The custom code to use in the child theme functions.php look like this:/// Add place selection to the booking object admin screen add_action('cmb2_booking_obj_after_address', 'owpc_cmb2_booking_obj_after_address', 10, 3); function owpc_cmb2_booking_obj_after_address( $cmb, $prefix, $category ){ $cmb->add_field( array( 'name' => __( 'Place', BABE_TEXTDOMAIN ), 'id' => $prefix . 'place_'.$category->slug, 'type' => 'owpc_places_select', 'desc' => '', 'attributes' => array( 'data-conditional-id' => $prefix . BABE_Post_types::$categories_tax, 'data-conditional-value' => $category->slug, ), ) ); } ////////////////////////////// add_filter( 'cmb2_render_owpc_places_select', 'owpc_cmb2_owpc_places_select', 10, 5 ); /** * Get places option list. * @return void */ function owpc_cmb2_owpc_places_select($field, $value, $object_id, $object_type, $field_type){ $output = ''; $args = array( 'post_type' => BABE_Post_types::$mpoints_post_type, 'numberposts' => -1, 'post_parent' => 0, 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC', ); $children_args = $args; $posts = get_posts( $args ); if ( $posts ) { $post_type_obj = get_post_type_object( BABE_Post_types::$mpoints_post_type ); $output .= '<select class="cmb2_mpoints_select" name="'.$field_type->_name().'" id="'.$field_type->_id().'" data-conditional-id="'.$field->args['attributes']['data-conditional-id'].'" data-conditional-value="'.$field->args['attributes']['data-conditional-value'].'"> <option class="" value=""'.selected( $value, 0, false ).' data-parent="0">'.$post_type_obj->labels->all_items.'</option>'; foreach ( $posts as $post ) { $children_args['post_parent'] = $post->ID; $children = get_children( $children_args ); $disabled = !empty($children) ? ' disabled' : ''; $output .= '<option class="" value="'.$post->ID.'"'.$disabled.' '.selected( $value, $post->ID, false ).' data-parent="0">'.$post->post_title.'</option>'; if (!empty($children)){ foreach($children as $child_post){ $output .= '<option class="" value="'.$child_post->ID.'" '.selected( $value, $child_post->ID, false ).' data-parent="'.$post->ID.'"> - '.$child_post->post_title.'</option>'; } } } $output .= '</select>'; } echo $output; } //////////////////////// Extend search form add_filter('babe_search_form_before_date_fields', 'owpc_babe_search_form_before_date_fields', 10, 1); function owpc_babe_search_form_before_date_fields($output){ ///// create places select field $args = array( 'post_type' => BABE_Post_types::$mpoints_post_type, 'numberposts' => -1, 'post_status' => 'publish', 'orderby' => 'menu_order', 'order' => 'ASC', ); $posts = get_posts( $args ); $field = ''; if ( empty($posts) ){ return $output; } $post_type_obj = get_post_type_object( BABE_Post_types::$mpoints_post_type ); $selected_name = $post_type_obj->labels->name; $selected_id = !empty($_GET['place']) ? (int)$_GET['place'] : ''; $add_class_all_items = ' term_item_selected'; foreach ($posts as $post){ $add_class = $post->ID == $selected_id ? ' term_item_selected' : ''; $post_title = get_the_title($post->ID); if($post->ID == $selected_id){ $selected_name = $post_title; $add_class_all_items = ''; } $field .= '<li class="term_item'.$add_class.'" data-id="'.$post->ID.'" data-value="'.$post_title.'">'.$post_title.'</li>'; } $field = '<li class="term_item'.$add_class_all_items.'" data-id="0" data-value="'.$post_type_obj->labels->name.'">'.$post_type_obj->labels->all_items.'</li>'.$field; $output .= ' <div class="add_input_field add_input_field_places is-active" tabindex="0"> <i class="fas fa-map-marker-alt"></i><div class="add_ids_title"> <div class="add_ids_title_value">' . $selected_name . '</div><i class="fas fa-chevron-down"></i> <ul id="add_ids_list_places" class="add_ids_list add_ids_list_places"> '.$field.' </ul> <input type="hidden" class="input_select_input_value" name="place" value="'.$selected_id.'"> </div> </div> '; return $output; } ///////////////Hook in search args to get appropriate result add_filter('babe_search_result_args', 'owpc_babe_search_result_args', 10, 1); function owpc_babe_search_result_args($args){ global $wpdb; if ( !empty($_GET['place']) ){ $place_id = (int)$_GET['place']; $query = "SELECT * FROM ".$wpdb->postmeta." WHERE meta_key LIKE 'place_%' AND meta_value = '".$place_id."'"; $results = $wpdb->get_results($query, ARRAY_A); if ( !empty($results) ){ foreach($results as $i => $result){ $args['post__in'][] = $result['post_id']; } } else { $args['post__in'] = [0]; } } return $args; }
—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] I want to set booking for hourly basisHello,
The booking mode on hourly basis is introduced in the BA Book Everything version 1.4.18.
Please, update the plugin, and check new feature in your test environment: add new booking rule on hourly basis, add appropriate booking category, create a yacht post with hourly booking category and check new booking form on the front-end.
P.S. make sure that your theme code doesn’t override the plugin code for the booking form.—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Coupon Problem – Negative AmountHello,
Thank you for reporting the bug!
The issue is fixed in BA Book Everything 1.4.14, please, update.
Since the coupon can be applied only once we can’t deduct the amount from the coupon for next use.—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] object as home pageHello,
There is no shortcode to put the tour in page content, sorry.
But it’s possible to setup the home page from custom post type (in our case it’s “to_book”). There are many examples on other forums that you can find like this one (just as a starter point for you).—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Custom Checkout FieldsHello,
While the solution actually works and you can also use the search form builder to customize the search form of the BA Book Everything plugin, it may not work in some themes.
Some of theme authors override the functionality of our plugin.
For example, if you use the Triply theme, to complete the checkout fields customization one more step is needed:
add a new field name (in our examples it’s a ‘new_field’) to the $args[‘meta’] array into the child theme checkout.php template file (around line 83). To implement this, you need to copy the checkout.php template from the parent theme with the same directory structure to your child theme.
Looks like this is your case.
Please, contact the theme author for further assistance.—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] pls answer all my quieryHello,
- You can use our plugin for integration with RazorPay
- You can setup prices by client age. But at least one adult guest (main age category) is required for any reservation.
- This forum topic could be a starter point in your customization.
- It looks like a general WordPress question. Please, follow the official WordPress codex for details.
—
Best Regards,
Booking Algorithms teamForum: Plugins
In reply to: [BA Book Everything] Results not showingHello,
Please, make sure that you entered available dates, prices and number of items for each booking object.
—
Best Regards,
Booking Algorithms team