Hotel Raxa - Advanced Booking System Implementation
🏨 Hotel Booking Enhancements: - Implemented Eagle Booking Advanced Pricing add-on - Added Booking.com-style rate management system - Created professional calendar interface for pricing - Integrated deals and discounts functionality 💰 Advanced Pricing Features: - Dynamic pricing models (per room, per person, per adult) - Base rates, adult rates, and child rates management - Length of stay discounts and early bird deals - Mobile rates and secret deals implementation - Seasonal promotions and flash sales 📅 Availability Management: - Real-time availability tracking - Stop sell and restriction controls - Closed to arrival/departure functionality - Minimum/maximum stay requirements - Automatic sold-out management 💳 Payment Integration: - Maintained Redsys payment gateway integration - Seamless integration with existing Eagle Booking - No modifications to core Eagle Booking plugin 🛠️ Technical Implementation: - Custom database tables for advanced pricing - WordPress hooks and filters integration - AJAX-powered admin interface - Data migration from existing Eagle Booking - Professional calendar view for revenue management 📊 Admin Interface: - Booking.com-style management dashboard - Visual rate and availability calendar - Bulk operations for date ranges - Statistics and analytics dashboard - Modal dialogs for quick editing 🔧 Code Quality: - WordPress coding standards compliance - Secure database operations with prepared statements - Proper input validation and sanitization - Error handling and logging - Responsive admin interface 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
120
wp-content/plugins/eagle-booking/core/vc/search/index.php
Normal file
120
wp-content/plugins/eagle-booking/core/vc/search/index.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* SEARCH FORM VC ELEMENT SETTINGS
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
function eb_search_form_shortcode($atts, $content = null) {
|
||||
|
||||
$atts = shortcode_atts(
|
||||
|
||||
array(
|
||||
|
||||
'eagle_booking_search_form_layout' => '',
|
||||
'eagle_booking_search_form_class' => '',
|
||||
'layout' => '',
|
||||
'branches' => '',
|
||||
'class' => ''
|
||||
|
||||
),
|
||||
|
||||
$atts);
|
||||
|
||||
ob_start();
|
||||
|
||||
// Include form parameters
|
||||
include_once EB_PATH . '/core/admin/form-parameters.php';
|
||||
|
||||
// Class
|
||||
$eb_search_form_class = $atts['class'];
|
||||
|
||||
// If the new class att value is empty then check the old one
|
||||
if ( empty( $eb_search_form_class ) ) $eb_search_form_class = $atts['eagle_booking_search_form_class'];
|
||||
|
||||
// Layout
|
||||
$eb_layout = $atts['layout'];
|
||||
|
||||
// If the new layout att value is empty then check the old one
|
||||
if ( empty( $eb_layout ) ) $eb_layout = $atts['eagle_booking_search_form_layout'];
|
||||
|
||||
// If still empty then set default layout
|
||||
if ( empty( $eb_layout ) ) $eb_layout = 'vertical';
|
||||
|
||||
|
||||
// Branched
|
||||
$include_branches = $atts['branches'];
|
||||
|
||||
// if ( $include_branches === 'false' ) $include_branches = false;
|
||||
|
||||
// Include Selected Layout
|
||||
include 'layout/'.$eb_layout.'.php';
|
||||
|
||||
$result = ob_get_contents();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
// Depracated
|
||||
add_shortcode('eagle_booking_search_form', 'eb_search_form_shortcode');
|
||||
|
||||
// New Shortcode
|
||||
add_shortcode('eb_search_form', 'eb_search_form_shortcode');
|
||||
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* SEARCH FORM VC ELEMENT
|
||||
/* @since 1.0.0
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
add_action( 'vc_before_init', 'eb_vc_search_form' );
|
||||
|
||||
function eb_vc_search_form() {
|
||||
|
||||
vc_map( array(
|
||||
"name" => __( "Booking Search Form", "eagle-booking" ),
|
||||
"base" => "eagle_booking_search_form",
|
||||
'show_settings_on_create' => true,
|
||||
"icon" => "icon-eagle",
|
||||
"class" => "",
|
||||
'category' => esc_html__("Eagle Themes",'eagle-booking'),
|
||||
"params" => array(
|
||||
|
||||
array(
|
||||
'type' => 'dropdown',
|
||||
'heading' => __( 'Layout', 'eagle-booking' ),
|
||||
'param_name' => 'eagle_booking_search_form_layout',
|
||||
"value" => array(
|
||||
'Vertical' => 'vertical',
|
||||
'Horizontal' => 'horizontal',
|
||||
'Horizontal Style 2' => 'horizontal-2',
|
||||
'Horizontal Style 3' => 'horizontal-3'
|
||||
),
|
||||
'description' => __( "Choose the layout", "eagle-booking" ),
|
||||
"save_always" => true,
|
||||
),
|
||||
|
||||
|
||||
// Branch Selector
|
||||
array(
|
||||
"type" => "dropdown",
|
||||
"class" => "",
|
||||
"heading" => "Branches",
|
||||
"param_name" => "branches",
|
||||
"value" => array(
|
||||
"False" => false,
|
||||
"True" => true
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
"type" => "textfield",
|
||||
"class" => "",
|
||||
"heading" => __( "Custom class", "eagle-booking" ),
|
||||
"param_name" => "eagle_booking_search_form_class",
|
||||
)
|
||||
)
|
||||
) );
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<div class="hbf-2 <?php echo esc_attr( $eb_search_form_class ); ?>">
|
||||
<div class="inner">
|
||||
<!--START FORM-->
|
||||
<form id="search-form" class="search-form" action="<?php echo $eagle_booking_action ?>" method="get" target="<?php echo esc_attr( $eagle_booking_target ) ?>">
|
||||
<div class="row">
|
||||
<!-- Custom Parameters -->
|
||||
<?php include eb_load_template('elements/custom-parameters.php'); ?>
|
||||
<!-- Check-In/Out-->
|
||||
<div class="<?php echo ( $include_branches == true ) ? "col-md-3" : "col-md-4" ?>">
|
||||
<?php include eb_load_template('elements/dates-picker.php'); ?>
|
||||
</div>
|
||||
<!-- Guests -->
|
||||
<div class="<?php echo ( $include_branches == true ) ? "col-md-3" : "col-md-4" ?>"">
|
||||
<?php include eb_load_template('elements/guests-picker.php'); ?>
|
||||
</div>
|
||||
|
||||
<!-- Branches -->
|
||||
<?php if ( $include_branches == true ) : ?>
|
||||
<div class="col-md-3">
|
||||
<?php include eb_load_template('elements/branch-selector.php'); ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Buttom -->
|
||||
<div class="<?php echo ( $include_branches == true ) ? "col-md-3" : "col-md-4" ?>"">
|
||||
<button id="eb_search_form" class="button eb-btn" type="submit">
|
||||
<span class="eb-btn-text"><?php echo __('Check Availability','eagle-booking') ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<div class="hbf-3 <?php echo esc_attr( $eb_search_form_class ); ?>">
|
||||
<div class="inner">
|
||||
<div class="container">
|
||||
<!--START FORM-->
|
||||
<form id="search-form" class="search-form" action="<?php echo $eagle_booking_action ?>" method="get" target="<?php echo esc_attr( $eagle_booking_target ) ?>">
|
||||
<div class="row">
|
||||
<!-- Custom Parameters -->
|
||||
<?php include eb_load_template('elements/custom-parameters.php'); ?>
|
||||
<!-- Check-In/Out-->
|
||||
<div class="<?php echo ( $include_branches == true ) ? "col-md-3" : "col-md-4" ?>">
|
||||
<?php include eb_load_template('elements/dates-picker.php'); ?>
|
||||
</div>
|
||||
<!-- Guests -->
|
||||
<div class="<?php echo ( $include_branches == true ) ? "col-md-3" : "col-md-4" ?>"">
|
||||
<?php include eb_load_template('elements/guests-picker.php'); ?>
|
||||
</div>
|
||||
|
||||
<!-- Branches -->
|
||||
<?php if ( $include_branches == true ) : ?>
|
||||
<div class="col-md-3">
|
||||
<?php include eb_load_template('elements/branch-selector.php'); ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Buttom -->
|
||||
<div class="<?php echo ( $include_branches == true ) ? "col-md-3" : "col-md-4" ?>"">
|
||||
<button id="eb_search_form" class="button eb-btn" type="submit">
|
||||
<span class="eb-btn-text"><?php echo __('Check Availability','eagle-booking') ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="hbf eb-search-form eb-horizontal-search-form <?php echo esc_attr( $eb_search_form_class ); ?>">
|
||||
<div class="inner">
|
||||
|
||||
<form id="search-form" class="search-form" action="<?php echo $eagle_booking_action ?>" method="get" target="<?php echo esc_attr( $eagle_booking_target ) ?>">
|
||||
|
||||
<div class="eb-form-fields">
|
||||
|
||||
<?php
|
||||
|
||||
include eb_load_template('elements/custom-parameters.php');
|
||||
|
||||
include eb_load_template('elements/dates-picker.php');
|
||||
|
||||
include eb_load_template('elements/guests-picker.php');
|
||||
|
||||
if ( $include_branches == true ) include eb_load_template('elements/branch-selector.php');
|
||||
|
||||
?>
|
||||
|
||||
<button id="eb_search_form" class="button btn eb-btn eb-btn-search-form" type="submit">
|
||||
<span class="eb-btn-text"><?php echo __('Check Availability','eagle-booking') ?></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
<div class="eb-search-form eb-vertical-search-form vbf vbf-over-slider <?php echo esc_attr($eb_search_form_class) ?>">
|
||||
|
||||
<h3 class="form_title"><?php echo __('Book Your Stay','eagle-booking') ?></h3>
|
||||
<div class="inner">
|
||||
<form id="search-form" class="search-form" action="<?php echo $eagle_booking_action ?>" method="get" target="<?php echo esc_attr( $eagle_booking_target ) ?>">
|
||||
|
||||
<?php
|
||||
|
||||
include eb_load_template('elements/custom-parameters.php');
|
||||
|
||||
include eb_load_template('elements/dates-picker.php');
|
||||
|
||||
include eb_load_template('elements/guests-picker.php');
|
||||
|
||||
if ( $include_branches == true ) include eb_load_template('elements/branch-selector.php');
|
||||
|
||||
?>
|
||||
|
||||
<button id="eb_search_form" class="button btn eb-btn" type="submit">
|
||||
<span class="eb-btn-text"><?php echo __('Check Availability','eagle-booking') ?></span>
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user